diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-12 21:07:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-12 21:07:25 +0000 |
commit | 221d688a5ef21a22c2368c9fff0e92d7966c95e5 (patch) | |
tree | d2dc21b19341a39bdc0a47f4736d76839d9ad73b /lib/Transforms/Scalar/ADCE.cpp | |
parent | 3c34a46c7e51ab290b208248461542eb83c469b0 (diff) |
Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 71c50674f4..7f71cf1850 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -13,6 +13,7 @@ #include "llvm/Analysis/Writer.h" #include "llvm/iTerminators.h" #include "llvm/iPHINode.h" +#include "llvm/Support/CFG.h" #include "Support/STLExtras.h" #include "Support/DepthFirstIterator.h" #include <algorithm> @@ -156,10 +157,12 @@ bool ADCE::doADCE(cfg::DominanceFrontier &CDG) { #ifdef DEBUG_ADCE cerr << "Current Method: X = Live\n"; - for (Method::inst_iterator IL = M->inst_begin(); IL != M->inst_end(); ++IL) { - if (LiveSet.count(*IL)) cerr << "X "; - cerr << *IL; - } + for (Method::iterator I = M->begin(), E = M->end(); I != E; ++I) + for (BasicBlock::iterator BI = (*I)->begin(), BE = (*I)->end(); + BI != BE; ++BI) { + if (LiveSet.count(*BI)) cerr << "X "; + cerr << *BI; + } #endif // After the worklist is processed, recursively walk the CFG in depth first |