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
This commit is contained in:
Chris Lattner
2002-02-12 21:07:25 +00:00
parent 3c34a46c7e
commit 221d688a5e
37 changed files with 128 additions and 83 deletions

View File

@ -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