DSE: Poking holes into a SetVector is expensive, avoid it if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163480 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2012-09-09 16:44:05 +00:00
parent 11b4505899
commit 3be7584f40

View File

@ -775,15 +775,15 @@ bool DSE::handleEndBlock(BasicBlock &BB) {
LiveAllocas.push_back(*I);
}
// If all of the allocas were clobbered by the call then we're not going
// to find anything else to process.
if (DeadStackObjects.size() == LiveAllocas.size())
break;
for (SmallVector<Value*, 8>::iterator I = LiveAllocas.begin(),
E = LiveAllocas.end(); I != E; ++I)
DeadStackObjects.remove(*I);
// If all of the allocas were clobbered by the call then we're not going
// to find anything else to process.
if (DeadStackObjects.empty())
break;
continue;
}