summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-22 21:56:32 +0000
committerChris Lattner <sabre@nondot.org>2002-05-22 21:56:32 +0000
commite1fc2d965fc5b0e45d57f29ccfdf8e1964b88eee (patch)
treecebdf50003c177e9d7ac165b70f402f1ac3f1baf /llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
parent559f0ee9c9e17aa307aca269c6267683928156ae (diff)
downloadbcm5719-llvm-e1fc2d965fc5b0e45d57f29ccfdf8e1964b88eee.tar.gz
bcm5719-llvm-e1fc2d965fc5b0e45d57f29ccfdf8e1964b88eee.zip
Convert code to use the DEBUG macro so that debug code can simply be
enabled with the -debug command line option. llvm-svn: 2721
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
index d4a20867c93..dcab1368000 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -102,9 +102,7 @@ bool ProfilePaths::runOnFunction(Function *M){
Graph g(nodes,edges, startNode, exitNode);
-#ifdef DEBUG_PATH_PROFILES
- printGraph(g);
-#endif
+ DEBUG(printGraph(g));
BasicBlock *fr=M->front();
@@ -114,9 +112,8 @@ bool ProfilePaths::runOnFunction(Function *M){
// by removing back edges for now, and adding them later on
vector<Edge> be;
g.getBackEdges(be);
-#ifdef DEBUG_PATH_PROFILES
- cerr<<"Backedges:"<<be.size()<<endl;
-#endif
+ DEBUG(cerr << "Backedges:" << be.size() << "\n");
+
// Now we need to reflect the effect of back edges
// This is done by adding dummy edges
// If a->b is a back edge
OpenPOWER on IntegriCloud