[PATCH] D133121: [PGO] Annotate branch_weight for invoke instruction

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 16:20:57 PDT 2022


xur marked an inline comment as done.
xur added a comment.

In D133121#3765650 <https://reviews.llvm.org/D133121#3765650>, @wenlei wrote:

> Why is invoke unique here? Can regular call never have both VP and branch weights? Ideally we'd avoid special case for a narrow type of instruction.

In FDO, branch weights only attached to terminal instruction (and call instruction is not, while invoke is). Indirect-call VP only attached to indirect-call or invoke instruction.  
In SampleFDO, we also attach a branch weight to direct-call. But again indirect-call only only for indirect-call and invoke.
So only invoke instruction can have both profile metadata.


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

https://reviews.llvm.org/D133121



More information about the llvm-commits mailing list