diff options
author | Brian Gesiak <modocache@gmail.com> | 2017-06-30 23:14:53 +0000 |
---|---|---|
committer | Brian Gesiak <modocache@gmail.com> | 2017-06-30 23:14:53 +0000 |
commit | 4ef3daafef7c53d03bd221a323d34ae2cd47d14d (patch) | |
tree | 4fad026658b6f904209da704a666f75f6a0ca41a /llvm/include | |
parent | 4fcfc19976c9abfb98008f67c973b99376580121 (diff) | |
download | bcm5719-llvm-4ef3daafef7c53d03bd221a323d34ae2cd47d14d.tar.gz bcm5719-llvm-4ef3daafef7c53d03bd221a323d34ae2cd47d14d.zip |
[ORE] Add diagnostics hotness threshold
Summary:
Add an option to prevent diagnostics that do not meet a minimum hotness
threshold from being output. When generating optimization remarks for
large codebases with a ton of cold code paths, this option can be used
to limit the optimization remark output at a reasonable size. Discussion of
this change can be read here:
http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html
Reviewers: anemet, davidxl, hfinkel
Reviewed By: anemet
Subscribers: qcolombet, javed.absar, fhahn, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D34867
llvm-svn: 306912
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/IR/LLVMContext.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h index c8ff90e3b08..b27abad618c 100644 --- a/llvm/include/llvm/IR/LLVMContext.h +++ b/llvm/include/llvm/IR/LLVMContext.h @@ -193,6 +193,15 @@ public: /// diagnostics. void setDiagnosticsHotnessRequested(bool Requested); + /// \brief Return the minimum hotness value a diagnostic would need in order + /// to be included in optimization diagnostics. If there is no minimum, this + /// returns None. + uint64_t getDiagnosticsHotnessThreshold() const; + + /// \brief Set the minimum hotness value a diagnostic needs in order to be + /// included in optimization diagnostics. + void setDiagnosticsHotnessThreshold(uint64_t Threshold); + /// \brief Return the YAML file used by the backend to save optimization /// diagnostics. If null, diagnostics are not saved in a file but only /// emitted via the diagnostic handler. |