diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-01-11 22:14:42 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-11 22:14:42 +0000 |
commit | d8c120bbd3ed19439c02ce629f312b163302b5dd (patch) | |
tree | 86ef533695b681189cfa6eb1033f87dba181b75b /lib | |
parent | b08773749a42a8c68afca96360b6e361147779b4 (diff) | |
download | external_llvm-d8c120bbd3ed19439c02ce629f312b163302b5dd.zip external_llvm-d8c120bbd3ed19439c02ce629f312b163302b5dd.tar.gz external_llvm-d8c120bbd3ed19439c02ce629f312b163302b5dd.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 279211d..014341b 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -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()); |