diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-29 20:28:57 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-29 20:28:57 +0000 |
commit | e41395ac2470f725ff70f6397185b1d0e8de39b2 (patch) | |
tree | 539bd42b869002357c7f6fc03e6a5306ee987b7f /llvm/lib/Transforms | |
parent | 7ac53ad6434c3dfbe3e451a7f9ac7e0e6a7a727c (diff) | |
download | bcm5719-llvm-e41395ac2470f725ff70f6397185b1d0e8de39b2.tar.gz bcm5719-llvm-e41395ac2470f725ff70f6397185b1d0e8de39b2.zip |
DSE: Remove an early exit optimization that depended on the ordering of a SmallPtrSet.
Fixes PR9569 and will hopefully make selfhost on ASLR-enabled systems more deterministic.
llvm-svn: 128482
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index b948bed9d44..f473cf5ca54 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -640,28 +640,15 @@ bool DSE::handleEndBlock(BasicBlock &BB) { if (AA->doesNotAccessMemory(CS)) continue; - unsigned NumModRef = 0, NumOther = 0; - // If the call might load from any of our allocas, then any store above // the call is live. SmallVector<Value*, 8> LiveAllocas; for (SmallPtrSet<Value*, 16>::iterator I = DeadStackObjects.begin(), E = DeadStackObjects.end(); I != E; ++I) { - // If we detect that our AA is imprecise, it's not worth it to scan the - // rest of the DeadPointers set. Just assume that the AA will return - // ModRef for everything, and go ahead and bail out. - if (NumModRef >= 16 && NumOther == 0) - return MadeChange; - // See if the call site touches it. AliasAnalysis::ModRefResult A = AA->getModRefInfo(CS, *I, getPointerSize(*I, *AA)); - if (A == AliasAnalysis::ModRef) - ++NumModRef; - else - ++NumOther; - if (A == AliasAnalysis::ModRef || A == AliasAnalysis::Ref) LiveAllocas.push_back(*I); } |