MemoryBuiltins: Properly guard ObjectSizeOffsetVisitor against cycles in the IR.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 17 Aug 2012 19:26:41 +0000 (19:26 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 17 Aug 2012 19:26:41 +0000 (19:26 +0000)
commit168843c0137ad67c24a3930244a9c5f60add320d
tree574e43853cce41bc60b227d2f065e39fcc023b57
parent32811bef956e0fae4329e6515420d85f7e510660
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
include/llvm/Analysis/MemoryBuiltins.h
lib/Analysis/MemoryBuiltins.cpp
test/Transforms/InstCombine/objsize.ll