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 | cb9c4f85ec0e99295576c40dab3f33f59007e545 (patch) | |
| tree | 8f26ba8d2dba56287233809b3665bb8f4cbfc78d /llvm/lib/Transforms | |
| parent | 803f48bcd11206cc4a7d6b6aba2a710bc57c8e5e (diff) | |
| download | bcm5719-llvm-cb9c4f85ec0e99295576c40dab3f33f59007e545.tar.gz bcm5719-llvm-cb9c4f85ec0e99295576c40dab3f33f59007e545.zip | |
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
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 279211d4080..014341b867d 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/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()); |

