diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-31 19:51:10 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-31 19:51:10 +0000 |
commit | 44365353a415d37daae9df53fbf6a91677ed90d3 (patch) | |
tree | a6565afa34591095f234c4ef1a98fd9aba9fab41 /lib/Analysis | |
parent | 526057921dcb57e0d51d60ddb0f5ce16596c307f (diff) | |
download | external_llvm-44365353a415d37daae9df53fbf6a91677ed90d3.zip external_llvm-44365353a415d37daae9df53fbf6a91677ed90d3.tar.gz external_llvm-44365353a415d37daae9df53fbf6a91677ed90d3.tar.bz2 |
Revert "add support for PHI nodes to ObjectSizeOffsetVisitor"
This reverts r171298. Breaks clang selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/MemoryBuiltins.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/Analysis/MemoryBuiltins.cpp b/lib/Analysis/MemoryBuiltins.cpp index a565617..1481580 100644 --- a/lib/Analysis/MemoryBuiltins.cpp +++ b/lib/Analysis/MemoryBuiltins.cpp @@ -543,20 +543,9 @@ SizeOffsetType ObjectSizeOffsetVisitor::visitLoadInst(LoadInst&) { return unknown(); } -SizeOffsetType ObjectSizeOffsetVisitor::visitPHINode(PHINode &PHI) { - if (PHI.getNumIncomingValues() == 0) - return unknown(); - - SizeOffsetType Ret = compute(PHI.getIncomingValue(0)); - if (!bothKnown(Ret)) - return unknown(); - - // verify that all PHI incoming pointers have the same size and offset - for (unsigned i = 1, e = PHI.getNumIncomingValues(); i != e; ++i) { - if (compute(PHI.getIncomingValue(i)) != Ret) - return unknown(); - } - return Ret; +SizeOffsetType ObjectSizeOffsetVisitor::visitPHINode(PHINode&) { + // too complex to analyze statically. + return unknown(); } SizeOffsetType ObjectSizeOffsetVisitor::visitSelectInst(SelectInst &I) { |