[PATCH] D158889: [AsmPrinter][PGO] Adds optional dumping of branch probabilities for PGO metrics.

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 08:58:34 PDT 2023


mtrofin added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1760
       default:
+        if (CanDumpBranchProbs && MI.isConditionalBranch() && !MI.isCall()) {
+          if (auto *MBPI =
----------------
red1bluelost wrote:
> mtrofin wrote:
> > what about virtual calls?
> I don't think MachineInstr has a notion of virtual calls. Unless you mean something else or I'm missing something.
Correct, but (I mean this as brainstorming, not blocking this patch - which still lgtm) you could for instance record "there's an indirect call here, with <profile>" and correlate with your trace. I.e. "are we missing out on indirect call promotion opportunities".




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158889/new/

https://reviews.llvm.org/D158889



More information about the llvm-commits mailing list