summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/IVUsers.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-16 03:16:56 +0000
committerAndrew Trick <atrick@apple.com>2012-03-16 03:16:56 +0000
commit75ae20366fd1b480f4cc38400bb075c43c9f4f7f (patch)
tree5755a9e690aa54dfe2971c55372c4ddf963cc0b5 /include/llvm/Analysis/IVUsers.h
parentd936045625ae2e101d3a9544586d7568c6dbacc0 (diff)
downloadllvm-75ae20366fd1b480f4cc38400bb075c43c9f4f7f.tar.gz
llvm-75ae20366fd1b480f4cc38400bb075c43c9f4f7f.tar.bz2
llvm-75ae20366fd1b480f4cc38400bb075c43c9f4f7f.tar.xz
LSR fix: Add isSimplifiedLoopNest to IVUsers analysis.
Only record IVUsers that are dominated by simplified loop headers. Otherwise SCEVExpander will crash while looking for a preheader. I previously tried to work around this in LSR itself, but that was insufficient. This way, LSR can continue to run if some uses are not in simple loops, as long as we don't attempt to analyze those users. Fixes <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/IVUsers.h')
-rw-r--r--include/llvm/Analysis/IVUsers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h
index 2a3bb9bc48..11d2cf0ac7 100644
--- a/include/llvm/Analysis/IVUsers.h
+++ b/include/llvm/Analysis/IVUsers.h
@@ -145,7 +145,8 @@ public:
/// AddUsersIfInteresting - Inspect the specified Instruction. If it is a
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
/// return true. Otherwise, return false.
- bool AddUsersIfInteresting(Instruction *I);
+ bool AddUsersIfInteresting(Instruction *I,
+ SmallPtrSet<Loop*,16> &SimpleLoopNests);
IVStrideUse &AddUser(Instruction *User, Value *Operand);