[llvm-branch-commits] [llvm] [Inline][PGO] After inline, update profile for invoke instruction in both cloned instruction in the caller and original callee (PR #83809)

Mingming Liu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 26 15:52:51 PDT 2024


minglotus-6 wrote:

> The invoke instruction can have 3 different kinds of prof data
> 
> 1. call count (if a direct call)
> 2. VP profile data (if an indirect call)
> 3. branch weights for landing pad.
> 4. can coexist with  2) and does not need to be updated. Is there an existing test coverage for type 1) update?

Added test cases for 1 and 2 in the pre-commit [PR](https://github.com/llvm/llvm-project/pull/83780) so the diff in this one is clearer.

As discussed offline, non-count prof data (i.e., representing taken or not taken branches, associated with `br` or `switchinst`, etc) doesn't need scaling so no extra work needed. PTAL.


https://github.com/llvm/llvm-project/pull/83809


More information about the llvm-branch-commits mailing list