diff options
Diffstat (limited to 'lib/Transforms/Utils/LoopUnroll.cpp')
-rw-r--r-- | lib/Transforms/Utils/LoopUnroll.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LoopUnroll.cpp b/lib/Transforms/Utils/LoopUnroll.cpp index d4e91e5c14..3c792dd136 100644 --- a/lib/Transforms/Utils/LoopUnroll.cpp +++ b/lib/Transforms/Utils/LoopUnroll.cpp @@ -413,8 +413,9 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, if (LPM) { // FIXME: Reconstruct dom info, because it is not preserved properly. // Incrementally updating domtree after loop unrolling would be easy. - if (DominatorTree *DT = LPM->getAnalysisIfAvailable<DominatorTree>()) - DT->runOnFunction(*L->getHeader()->getParent()); + if (DominatorTreeWrapperPass *DTWP = + LPM->getAnalysisIfAvailable<DominatorTreeWrapperPass>()) + DTWP->getDomTree().recalculate(*L->getHeader()->getParent()); // Simplify any new induction variables in the partially unrolled loop. ScalarEvolution *SE = LPM->getAnalysisIfAvailable<ScalarEvolution>(); |