aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-08-17 19:26:41 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-08-17 19:26:41 +0000
commit168843c0137ad67c24a3930244a9c5f60add320d (patch)
tree574e43853cce41bc60b227d2f065e39fcc023b57 /include
parent32811bef956e0fae4329e6515420d85f7e510660 (diff)
downloadexternal_llvm-168843c0137ad67c24a3930244a9c5f60add320d.zip
external_llvm-168843c0137ad67c24a3930244a9c5f60add320d.tar.gz
external_llvm-168843c0137ad67c24a3930244a9c5f60add320d.tar.bz2
MemoryBuiltins: Properly guard ObjectSizeOffsetVisitor against cycles in the IR.
The previous fix only checked for simple cycles, use a set to catch longer cycles too. Drop the broken check from the ObjectSizeOffsetEvaluator. The BoundsChecking pass doesn't have to deal with invalid IR like InstCombine does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/MemoryBuiltins.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h
index e674e74..e16f389 100644
--- a/include/llvm/Analysis/MemoryBuiltins.h
+++ b/include/llvm/Analysis/MemoryBuiltins.h
@@ -146,6 +146,7 @@ class ObjectSizeOffsetVisitor
bool RoundToAlign;
unsigned IntTyBits;
APInt Zero;
+ SmallPtrSet<Instruction *, 8> SeenInsts;
APInt align(APInt Size, uint64_t Align);
@@ -203,7 +204,6 @@ class ObjectSizeOffsetEvaluator
const TargetData *TD;
LLVMContext &Context;
BuilderTy Builder;
- ObjectSizeOffsetVisitor Visitor;
IntegerType *IntTy;
Value *Zero;
CacheMapTy CacheMap;