diff options
author | Andrew Trick <atrick@apple.com> | 2011-01-29 01:09:53 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-01-29 01:09:53 +0000 |
commit | 24f5ff0f234b1b786291d79e252ef1a7a7eb5f4b (patch) | |
tree | 10198d00ffe2811bff03dd747d5a2f6c4e528c49 /llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp | |
parent | fea7ddc735d0f0981c2d8b0d0eeae1dd2ad88770 (diff) | |
download | bcm5719-llvm-24f5ff0f234b1b786291d79e252ef1a7a7eb5f4b.tar.gz bcm5719-llvm-24f5ff0f234b1b786291d79e252ef1a7a7eb5f4b.zip |
Implementation of path profiling.
Modified patch by Adam Preuss.
This builds on the existing framework for block tracing, edge profiling and optimal edge profiling.
See -help-hidden for new flags.
For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs.
llvm-svn: 124515
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp index fe99b21a886..1d31fcc4df3 100644 --- a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -17,6 +17,7 @@ // //===----------------------------------------------------------------------===// #define DEBUG_TYPE "insert-edge-profiling" + #include "ProfilingUtils.h" #include "llvm/Module.h" #include "llvm/Pass.h" @@ -100,7 +101,7 @@ bool EdgeProfiler::runOnModule(Module &M) { // otherwise insert it in the successor block. if (TI->getNumSuccessors() == 1) { // Insert counter at the start of the block - IncrementCounterInBlock(BB, i++, Counters); + IncrementCounterInBlock(BB, i++, Counters, false); } else { // Insert counter at the start of the block IncrementCounterInBlock(TI->getSuccessor(s), i++, Counters); |