[PATCH] D80618: Extend InvokeInst !prof branch_weights metadata to unwind branches
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 02:45:59 PDT 2020
yrouban marked 6 inline comments as done.
yrouban added a comment.
In D80618#2063604 <https://reviews.llvm.org/D80618#2063604>, @xur wrote:
> Thanks for the fix. We also noticed that the branch weight for invoke instructions were not set properly, even thought we had the profile information in PGO.
> I have a check that disables setting the branch weight metadata for IRPGO. Once this patch is in. I can remove that check. Of you can integrate that change into this patch.
> It's in PGOUseFunc::setBranchWeights(). Just white-list InvokeInst.
done
================
Comment at: llvm/lib/IR/Instruction.cpp:791
+
+ if (!ProfDataName->getString().equals("branch_weights") &&
+ !(ProfDataName->getString().equals("VP") &&
----------------
reames wrote:
> Note sure you need these validation checks here since the source can be presumed valid.
With this comment and having in mind the comments about type of //this// and //SrcCB// I decided to get rid of the method at all and just call NewCB->copyMetadata(OldCB, {LLVMContext::MD_prof}).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80618/new/
https://reviews.llvm.org/D80618
More information about the llvm-commits
mailing list