Convert code to use the DEBUG macro so that debug code can simply be

enabled with the -debug command line option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-05-22 21:56:32 +00:00
parent d9036a1aad
commit f09c74c385
5 changed files with 147 additions and 197 deletions

View File

@@ -201,12 +201,9 @@ void insertBB(Edge ed,
BasicBlock* BB1=ed.getFirst()->getElement();
BasicBlock* BB2=ed.getSecond()->getElement();
#ifdef DEBUG_PATH_PROFILES
//debugging info
cerr<<"Edges with codes ######################\n";
cerr<<BB1->getName()<<"->"<<BB2->getName()<<"\n";
cerr<<"########################\n";
#endif
DEBUG(cerr << "Edges with codes ######################\n";
cerr << BB1->getName() << "->" << BB2->getName() << "\n";
cerr << "########################\n");
//We need to insert a BB between BB1 and BB2
TerminatorInst *TI=BB1->getTerminator();
@@ -250,10 +247,8 @@ void insertBB(Edge ed,
BB2Inst!=BBend; ++BB2Inst){
if(PHINode *phiInst=dyn_cast<PHINode>(*BB2Inst)){
#ifdef DEBUG_PATH_PROFILES
cerr<<"YYYYYYYYYYYYYYYYY\n";
#endif
DEBUG(cerr<<"YYYYYYYYYYYYYYYYY\n");
int bbIndex=phiInst->getBasicBlockIndex(BB1);
if(bbIndex>=0)
phiInst->setIncomingBlock(bbIndex, newBB);