diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-22 21:56:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-22 21:56:32 +0000 |
commit | f09c74c3859f3c97dfe36d22d9ff1c536fc825ed (patch) | |
tree | 67c61113ce7c9a2e3318d197a645c2a53947a103 /lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp | |
parent | d9036a1aad813b419edcec8e17d24bcaedd72065 (diff) |
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
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp b/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp index 0b6d17d683..f8d761627e 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp @@ -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); |