[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
Mon Mar 4 20:03:35 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:
It makes sense to move them to `CallBase`. Will need to construct a test case (possibly based on https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGen/asm-goto.c)
- The difference between 1) current patch and 2) moving this to 'CallBase' and calling `updateProfWeight` on a `CallBase` is that, branch weight of terminating instruction `callbr` ([lowered](https://llvm.org/docs/LangRef.html#callbr-instruction) from inline assembly [goto](https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#GotoLabels)) will also be updated.
https://github.com/llvm/llvm-project/pull/83809
More information about the llvm-branch-commits
mailing list