diff options
| author | Rong Xu <xur@google.com> | 2015-11-24 21:31:25 +0000 |
|---|---|---|
| committer | Rong Xu <xur@google.com> | 2015-11-24 21:31:25 +0000 |
| commit | 1b665ca707f49cd613c5ac9cec620aa284c19727 (patch) | |
| tree | 0bc7cea9a126d1cd638240fe9c64c39618185b8f /llvm/lib/IR | |
| parent | d450da3281abf8443a4cd0ea3db37c8c7c47c0af (diff) | |
| download | bcm5719-llvm-1b665ca707f49cd613c5ac9cec620aa284c19727.tar.gz bcm5719-llvm-1b665ca707f49cd613c5ac9cec620aa284c19727.zip | |
[PGO] MST based PGO instrumentation infrastructure
This patch implements a minimum spanning tree (MST) based instrumentation for
PGO. The use of MST guarantees minimum number of CFG edges getting
instrumented. An addition optimization is to instrument the less executed
edges to further reduce the instrumentation overhead. The patch contains both the
instrumentation and the use of the profile to set the branch weights.
Differential Revision: http://reviews.llvm.org/D12781
llvm-svn: 254021
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/DiagnosticInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp index 4753789d9c1..6426f76bbaa 100644 --- a/llvm/lib/IR/DiagnosticInfo.cpp +++ b/llvm/lib/IR/DiagnosticInfo.cpp @@ -132,6 +132,12 @@ void DiagnosticInfoSampleProfile::print(DiagnosticPrinter &DP) const { DP << getMsg(); } +void DiagnosticInfoPGOProfile::print(DiagnosticPrinter &DP) const { + if (getFileName()) + DP << getFileName() << ": "; + DP << getMsg(); +} + bool DiagnosticInfoOptimizationBase::isLocationAvailable() const { return getDebugLoc(); } |

