[PATCH] D57149: [StackProtector] Skip analysing dead users in HasAddressTaken, PR40436

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 05:24:32 PST 2019


uabelho created this revision.
uabelho added reviewers: petpav01, mattd, rnk.
Herald added a subscriber: javed.absar.

The usual SSA rules don't apply for code that isn't reachable from the
entry, so we might find a user like

%user = select i1 %bool, i8* %ai, i8* %user

which is using itself, and then when examining that we would make
HasAddressTaken recurse until it blows the stack.

To determine if the user is in a basic block reachable from entry, we now
require that we have DominatorTree information. That affected a few test
cases checking the pass pipeline.


Repository:
  rL LLVM

https://reviews.llvm.org/D57149

Files:
  lib/CodeGen/StackProtector.cpp
  test/CodeGen/AArch64/O0-pipeline.ll
  test/CodeGen/AArch64/O3-pipeline.ll
  test/CodeGen/X86/O0-pipeline.ll
  test/CodeGen/X86/O3-pipeline.ll
  test/CodeGen/X86/stack-protector-unreachable-code.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57149.183288.patch
Type: text/x-patch
Size: 5823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190124/05e27160/attachment.bin>


More information about the llvm-commits mailing list