diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-26 18:40:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-26 18:40:14 +0000 |
commit | ce6ef112c4abb1f7fd64738c5760f48cddc9a4a5 (patch) | |
tree | d20df3512eb0212eaff8ebb8b0c077209944b242 /lib/Transforms/Scalar | |
parent | 0cbc6c2fd8470c62d824667fc600d80a494d26cd (diff) | |
download | external_llvm-ce6ef112c4abb1f7fd64738c5760f48cddc9a4a5.zip external_llvm-ce6ef112c4abb1f7fd64738c5760f48cddc9a4a5.tar.gz external_llvm-ce6ef112c4abb1f7fd64738c5760f48cddc9a4a5.tar.bz2 |
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index d70980e..058ef1b 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -55,8 +55,8 @@ public: // getAnalysisUsage - We require post dominance frontiers (aka Control // Dependence Graph) virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(DominatorTree::PostDomID); - AU.addRequired(DominanceFrontier::PostDomID); + AU.addRequired(PostDominatorTree::ID); + AU.addRequired(PostDominanceFrontier::ID); } @@ -93,13 +93,12 @@ void ADCE::markBlockAlive(BasicBlock *BB) { // Mark the basic block as being newly ALIVE... and mark all branches that // this block is control dependant on as being alive also... // - DominanceFrontier &CDG = - getAnalysis<DominanceFrontier>(DominanceFrontier::PostDomID); + PostDominanceFrontier &CDG = getAnalysis<PostDominanceFrontier>(); - DominanceFrontier::const_iterator It = CDG.find(BB); + PostDominanceFrontier::const_iterator It = CDG.find(BB); if (It != CDG.end()) { // Get the blocks that this node is control dependant on... - const DominanceFrontier::DomSetType &CDB = It->second; + const PostDominanceFrontier::DomSetType &CDB = It->second; for_each(CDB.begin(), CDB.end(), // Mark all their terminators as live bind_obj(this, &ADCE::markTerminatorLive)); } @@ -191,7 +190,7 @@ bool ADCE::doADCE() { // Find the first postdominator of the entry node that is alive. Make it the // new entry node... // - DominatorTree &DT = getAnalysis<DominatorTree>(DominatorTree::PostDomID); + PostDominatorTree &DT = getAnalysis<PostDominatorTree>(); // If there are some blocks dead... if (AliveBlocks.size() != Func->size()) { @@ -218,8 +217,8 @@ bool ADCE::doADCE() { // postdominator that is alive, and the last postdominator that is // dead... // - DominatorTree::Node *LastNode = DT[TI->getSuccessor(i)]; - DominatorTree::Node *NextNode = LastNode->getIDom(); + PostDominatorTree::Node *LastNode = DT[TI->getSuccessor(i)]; + PostDominatorTree::Node *NextNode = LastNode->getIDom(); while (!AliveBlocks.count(NextNode->getNode())) { LastNode = NextNode; NextNode = NextNode->getIDom(); |