aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopUnswitch.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2006-06-12 21:49:21 +0000
committerOwen Anderson <resistor@mac.com>2006-06-12 21:49:21 +0000
commit6edf399bb4a83813352bac2e6392d034955e2214 (patch)
tree8d1c1af7554aff8ab6977784ffee260713113cb4 /lib/Transforms/Scalar/LoopUnswitch.cpp
parent7f2e1dd5d42a4411e5d4c89297952325239b4c2a (diff)
Reapply my 6/9 changes. The bug Evan saw no longer occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp
index c583eea14d..79243a4385 100644
--- a/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -73,6 +73,8 @@ namespace {
AU.addPreservedID(LoopSimplifyID);
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
+ AU.addRequiredID(LCSSAID);
+ AU.addPreservedID(LCSSAID);
}
private:
@@ -154,6 +156,8 @@ static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed) {
}
bool LoopUnswitch::visitLoop(Loop *L) {
+ assert(L->isLCSSAForm());
+
bool Changed = false;
// Loop over all of the basic blocks in the loop. If we find an interior
@@ -198,7 +202,9 @@ bool LoopUnswitch::visitLoop(Loop *L) {
}
}
}
-
+
+ assert(L->isLCSSAForm());
+
return Changed;
}