diff options
author | Adam Nemet <anemet@apple.com> | 2017-10-04 04:25:31 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2017-10-04 04:25:31 +0000 |
commit | 28c2c22624dd03f56862b62fd1c2ccea8d22cdd8 (patch) | |
tree | d3f2ee60f87929df223a1dfef277fccf32072902 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 289728d5a6ed09bc657f04ec4db6e1ee0c5121cf (diff) | |
download | bcm5719-llvm-28c2c22624dd03f56862b62fd1c2ccea8d22cdd8.tar.gz bcm5719-llvm-28c2c22624dd03f56862b62fd1c2ccea8d22cdd8.zip |
Move verbosity check for opt remarks to the diag handler.
llvm-svn: 314873
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 51dee175447..7f9c3771f14 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -631,6 +631,10 @@ void BackendConsumer::EmitOptimizationMessage( void BackendConsumer::OptimizationRemarkHandler( const llvm::DiagnosticInfoOptimizationBase &D) { + // Without hotness information, don't show noisy remarks. + if (D.isVerbose() && !D.getHotness()) + return; + if (D.isPassed()) { // Optimization remarks are active only if the -Rpass flag has a regular // expression that matches the name of the pass name in \p D. |