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

Micah Weston via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 13:46:21 PDT 2023


red1bluelost added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1760
       default:
+        if (CanDumpBranchProbs && MI.isConditionalBranch() && !MI.isCall()) {
+          if (auto *MBPI =
----------------
mtrofin wrote:
> 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".
> 
> 
That definitely sounds like a good idea. Our encoded reserved space just for this type of extra info. Agreed it'd fit in a later patch :)


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

https://reviews.llvm.org/D158889



More information about the llvm-commits mailing list