[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 5 10:38:26 PST 2024


================
@@ -918,6 +918,18 @@ LandingPadInst *InvokeInst::getLandingPadInst() const {
   return cast<LandingPadInst>(getUnwindDest()->getFirstNonPHI());
 }
 
+void InvokeInst::updateProfWeight(uint64_t S, uint64_t T) {
----------------
minglotus-6 wrote:

https://llvm.org/docs/BranchWeightMetadata.html#other mentions _Other terminator instructions are not allowed to contain Branch Weight Metadata_, indicating `callbr` instruction shouldn't have branch weight metadata attached.

Is there a reason why branch weight `!prof` cannot be attached to `callbr`?

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


More information about the llvm-branch-commits mailing list