diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-24 15:43:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-24 15:43:56 +0000 |
commit | 16e7a5295f95bd5162ea9f541b0a211850b6f6f7 (patch) | |
tree | b75ad820e8111c88bc15f251db8c83201917301a /lib/Transforms/Scalar/CorrelatedExprs.cpp | |
parent | 6de302bbdb0ac8a595ca35a06e5bbc1605e1da3e (diff) | |
download | llvm-16e7a5295f95bd5162ea9f541b0a211850b6f6f7.tar.gz llvm-16e7a5295f95bd5162ea9f541b0a211850b6f6f7.tar.bz2 llvm-16e7a5295f95bd5162ea9f541b0a211850b6f6f7.tar.xz |
Correlated Exprs pass now requires BCE pass instead of doing it manually
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CorrelatedExprs.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CorrelatedExprs.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 9be508d3a8..441c7990f1 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -204,9 +204,9 @@ namespace { // 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 @@ -307,25 +307,6 @@ bool CEE::TransformRegion(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks){ // 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 // blocks that are dominated by this one, we can safely propogate the |