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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits