1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Dial back the speculative fix for PR8954 a bit, so that we only recompute dominators

once at the beginning of GVN instead of once per iteration.

llvm-svn: 123278
This commit is contained in:
Cameron Zwarich 2011-01-11 22:14:42 +00:00
parent 1cd577b435
commit b0e688cc7c

View File

@ -1754,6 +1754,9 @@ bool GVN::runOnFunction(Function& F) {
unsigned Iteration = 0;
// FIXME: Remove this when PR8954 is fixed.
DT->DT->recalculate(F);
while (ShouldContinue) {
DEBUG(dbgs() << "GVN iteration: " << Iteration << "\n");
ShouldContinue = iterateOnFunction(F);
@ -2011,7 +2014,6 @@ bool GVN::iterateOnFunction(Function &F) {
RE = RPOT.end(); RI != RE; ++RI)
Changed |= processBlock(*RI);
#else
DT->DT->recalculate(F);
for (df_iterator<DomTreeNode*> DI = df_begin(DT->getRootNode()),
DE = df_end(DT->getRootNode()); DI != DE; ++DI)
Changed |= processBlock(DI->getBlock());