diff options
author | Dan Gohman <gohman@apple.com> | 2010-03-10 19:38:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-03-10 19:38:49 +0000 |
commit | a76b558616efea73f82a3ffe8a653aeb8c401fd5 (patch) | |
tree | 5f7c42f02f48b98837c3eeba3191dbb2cd588975 /lib/Transforms/Scalar | |
parent | 213d1b8f757defd90fa86def3aa9f178e9561a71 (diff) | |
download | external_llvm-a76b558616efea73f82a3ffe8a653aeb8c401fd5.zip external_llvm-a76b558616efea73f82a3ffe8a653aeb8c401fd5.tar.gz external_llvm-a76b558616efea73f82a3ffe8a653aeb8c401fd5.tar.bz2 |
Add a DominatorTree argument to isLCSSA so that it doesn't have to
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnrollPass.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index cb563c3..838a3e7 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -215,7 +215,7 @@ ICmpInst *IndVarSimplify::LinearFunctionTestReplace(Loop *L, void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) { // Verify the input to the pass in already in LCSSA form. - assert(L->isLCSSAForm()); + assert(L->isLCSSAForm(*DT)); SmallVector<BasicBlock*, 8> ExitBlocks; L->getUniqueExitBlocks(ExitBlocks); @@ -445,7 +445,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // Clean up dead instructions. Changed |= DeleteDeadPHIs(L->getHeader()); // Check a post-condition. - assert(L->isLCSSAForm() && "Indvars did not leave the loop in lcssa form!"); + assert(L->isLCSSAForm(*DT) && "Indvars did not leave the loop in lcssa form!"); return Changed; } diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp index a355ec3..4ad41ae 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -86,7 +86,6 @@ static unsigned ApproximateLoopSize(const Loop *L, unsigned &NumCalls) { } bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { - assert(L->isLCSSAForm()); LoopInfo *LI = &getAnalysis<LoopInfo>(); BasicBlock *Header = L->getHeader(); diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 071e9b7..e3b809e 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -206,7 +206,7 @@ bool LoopUnswitch::runOnLoop(Loop *L, LPPassManager &LPM_Ref) { Function *F = currentLoop->getHeader()->getParent(); bool Changed = false; do { - assert(currentLoop->isLCSSAForm()); + assert(currentLoop->isLCSSAForm(*DT)); redoLoop = false; Changed |= processCurrentLoop(); } while(redoLoop); |