[PATCH] D85808: [Remarks][2/2] Expand remarks hotness threshold option support in more tools
Wei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 13:24:56 PDT 2020
weiwang added inline comments.
================
Comment at: llvm/lib/Analysis/OptimizationRemarkEmitter.cpp:103
BFI = &getAnalysis<LazyBlockFrequencyInfoPass>().getBFI();
- else
+ // Get hotness threshold from PSI. This should only happen once.
+ if (Context.isDiagnosticsHotnessThresholdSetFromPSI()) {
----------------
tejohnson wrote:
> Can you clarify what you mean by this only happening once?
The check of `Context.isDiagnosticsHotnessThresholdSetFromPSI()` guarantees that `ProfileSummaryInfoWrapperPass` and `setDiagnosticsHotnessThreshold` would only be called once. Once the threshold is set from PSI, the check always returns false. But strictly speaking, since PSI is immutable, it only happens once with/without the check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85808/new/
https://reviews.llvm.org/D85808
More information about the llvm-commits
mailing list