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/OptimalEdgeProfiling.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/OptimalEdgeProfiling.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp index 96a54172823..c85a1a9391d 100644 --- a/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp @@ -52,12 +52,12 @@ namespace { } char OptimalEdgeProfiler::ID = 0; -INITIALIZE_PASS_BEGIN(OptimalEdgeProfiler, "insert-optimal-edge-profiling", +INITIALIZE_PASS_BEGIN(OptimalEdgeProfiler, "insert-optimal-edge-profiling", "Insert optimal instrumentation for edge profiling", false, false) INITIALIZE_PASS_DEPENDENCY(ProfileEstimatorPass) INITIALIZE_AG_DEPENDENCY(ProfileInfo) -INITIALIZE_PASS_END(OptimalEdgeProfiler, "insert-optimal-edge-profiling", +INITIALIZE_PASS_END(OptimalEdgeProfiler, "insert-optimal-edge-profiling", "Insert optimal instrumentation for edge profiling", false, false) @@ -132,11 +132,11 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { // Calculate a Maximum Spanning Tree with the edge weights determined by // ProfileEstimator. ProfileEstimator also assign weights to the virtual // edges (0,entry) and (BB,0) (for blocks with no successors) and this - // edges also participate in the maximum spanning tree calculation. + // edges also participate in the maximum spanning tree calculation. // The third parameter of MaximumSpanningTree() has the effect that not the // actual MST is returned but the edges _not_ in the MST. - ProfileInfo::EdgeWeights ECs = + ProfileInfo::EdgeWeights ECs = getAnalysis<ProfileInfo>(*F).getEdgeWeights(F); std::vector<ProfileInfo::EdgeWeight> EdgeVector(ECs.begin(), ECs.end()); MaximumSpanningTree<BasicBlock> MST (EdgeVector); |