[llvm] [Inline][PGO] After inline, update InvokeInst profile counts in caller and cloned callee (PR #83809)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 16:10:27 PDT 2024
================
@@ -201,14 +201,23 @@ void scaleProfData(Instruction &I, uint64_t S, uint64_t T) {
!ProfDataName->getString().equals("VP")))
return;
+ // If an instruction is a call and its branch weight has more than two
+ // operands, it represents taken vs not-taken branch probabilities and doesn't
+ // need scaling.
+ if (isa<CallBase>(&I) && ProfDataName->getString().equals("branch_weights") &&
----------------
david-xl wrote:
Should we introduce a common API to get the profile annotation type? BR_Weight, Call_Count ...?
https://github.com/llvm/llvm-project/pull/83809
More information about the llvm-commits
mailing list