summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-08 15:45:00 +0000
committerDan Gohman <gohman@apple.com>2009-09-08 15:45:00 +0000
commit9cec4125f92b12880692c3e4a378b792a85ea67a (patch)
treef34aa8c5b5b7783f84d985d44c086360683dc226 /lib/Transforms/Scalar/LICM.cpp
parentdd528195c766db4211a29e0955e5f888f322dc37 (diff)
downloadexternal_llvm-9cec4125f92b12880692c3e4a378b792a85ea67a.zip
external_llvm-9cec4125f92b12880692c3e4a378b792a85ea67a.tar.gz
external_llvm-9cec4125f92b12880692c3e4a378b792a85ea67a.tar.bz2
Re-apply r80926, with fixes: keep the domtree informed of new blocks
that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--lib/Transforms/Scalar/LICM.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 15bb9c7..1c29878 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -91,6 +91,7 @@ namespace {
AU.addRequired<AliasAnalysis>();
AU.addPreserved<ScalarEvolution>();
AU.addPreserved<DominanceFrontier>();
+ AU.addPreservedID(LoopSimplifyID);
}
bool doFinalization() {