[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 24 10:44:01 PDT 2002
Changes in directory llvm/lib/Transforms/Scalar:
CorrelatedExprs.cpp updated: 1.3 -> 1.4
---
Log message:
Correlated Exprs pass now requires BCE pass instead of doing it manually
---
Diffs of the changes:
Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.3 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.4
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.3 Mon Sep 23 15:06:22 2002
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Tue Sep 24 10:43:56 2002
@@ -204,9 +204,9 @@
// We don't modify the program, so we preserve all analyses
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
- //AU.preservesCFG();
AU.addRequired<DominatorSet>();
AU.addRequired<DominatorTree>();
+ AU.addRequiredID(BreakCriticalEdgesID);
};
// print - Implement the standard print form to print out analysis
@@ -306,25 +306,6 @@
// Get the terminator of this basic block...
TerminatorInst *TI = BB->getTerminator();
-
- // If this is a conditional branch, make sure that there is a branch target
- // for each successor that can hold any information gleaned from the branch,
- // by breaking any critical edges that may be laying about.
- //
- if (TI->getNumSuccessors() > 1) {
- // If any of the successors has multiple incoming branches, add a new dummy
- // destination branch that only contains an unconditional branch to the real
- // target.
- for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) {
- BasicBlock *Succ = TI->getSuccessor(i);
- // If there is more than one predecessor of the destination block, break
- // this critical edge by inserting a new block. This updates dominatorset
- // and dominatortree information.
- //
- if (isCriticalEdge(TI, i))
- SplitCriticalEdge(TI, i, this);
- }
- }
// Loop over all of the blocks that this block is the immediate dominator for.
// Because all information known in this region is also known in all of the
More information about the llvm-commits
mailing list