[PATCH] D34867: [ORE] Add diagnostics hotness threshold
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 12:29:38 PDT 2017
anemet added inline comments.
================
Comment at: lib/Analysis/OptimizationDiagnosticInfo.cpp:159-165
+ // If a diagnostic has a hotness value, then only emit it if its hotness
+ // meets the threshold.
+ auto Threshold = F->getContext().getDiagnosticsHotnessThreshold();
+ if (OptDiag.getHotness() && Threshold &&
+ *OptDiag.getHotness() < *Threshold) {
+ return;
+ }
----------------
modocache wrote:
> anemet wrote:
> > You need to add the same code to MachineOptimizationRemarkEmitter::emit() too.
> Oh, good catch, thank you! Do you know if there's an existing test for MachineOptimizationRemarkEmitter?
There are a few, look for pass-remarks under test/CodeGen. The one I originally added is test/CodeGen/AArch64/arm64-spill-remarks.ll.
https://reviews.llvm.org/D34867
More information about the llvm-commits
mailing list