[llvm] [BOLT] Fix the inaccurate profile data check (PR #136278)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 20 19:43:10 PDT 2025
================
@@ -524,6 +524,9 @@ float DataReader::evaluateProfileData(BinaryFunction &BF,
// when we identify tail calls, so they are still represented
// by regular branch instructions and we need isBranch() here.
MCInst *Instr = BF.getInstructionAtOffset(BI.From.Offset);
+ // If it's a RISCV PseudoCALL - fix it
+ if (!Instr && BC.isRISCV())
----------------
WangJee wrote:
MCInst *Instr = BF.getInstructionAtOffset(BI.From.Offset);
But if this method is used, the first instruction will return nullptr, and the second instruction can correctly obtain jalr
https://github.com/llvm/llvm-project/pull/136278
More information about the llvm-commits
mailing list