diff options
author | Chris Lattner <sabre@nondot.org> | 2010-08-29 17:21:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-08-29 17:21:35 +0000 |
commit | 937790195ecb644e3fcbae2d70a879748c14b4b8 (patch) | |
tree | 3475006563375ad915d933603fd17bc833df01a8 /lib/Transforms/Scalar/LoopUnrollPass.cpp | |
parent | eaa40ff74e41176250bd6b50116ab03b0c596d5e (diff) |
now that loop passes don't use DomFrontier, there is no reason
for the unroller to pretend it supports updating it. It still
has a horrible hack for DomTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnrollPass.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnrollPass.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp index 4ed2d45687..d0edfa2200 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -62,13 +62,12 @@ namespace { AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); + AU.addPreserved<ScalarEvolution>(); // FIXME: Loop unroll requires LCSSA. And LCSSA requires dom info. // If loop unroll does not preserve dom info then LCSSA pass on next // loop will receive invalid dom info. // For now, recreate dom info, if loop is unrolled. AU.addPreserved<DominatorTree>(); - AU.addPreserved<DominanceFrontier>(); - AU.addPreserved<ScalarEvolution>(); } }; } @@ -148,12 +147,7 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { return false; // FIXME: Reconstruct dom info, because it is not preserved properly. - DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>(); - if (DT) { + if (DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>()) DT->runOnFunction(*F); - DominanceFrontier *DF = getAnalysisIfAvailable<DominanceFrontier>(); - if (DF) - DF->runOnFunction(*F); - } return true; } |