[llvm-commits] [llvm] r112444 - /llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 29 10:21:35 PDT 2010
Author: lattner
Date: Sun Aug 29 12:21:35 2010
New Revision: 112444
URL: http://llvm.org/viewvc/llvm-project?rev=112444&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=112444&r1=112443&r2=112444&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Sun Aug 29 12:21:35 2010
@@ -62,13 +62,12 @@
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 @@
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;
}
More information about the llvm-commits
mailing list