[llvm] [BOLT]Identify indirect call (PR #123305)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 04:41:51 PST 2025
================
@@ -1961,6 +1961,59 @@ bool BinaryFunction::postProcessIndirectBranches(
bool IsEpilogue = llvm::any_of(BB, [&](const MCInst &Instr) {
return BC.MIB->isLeave(Instr) || BC.MIB->isPop(Instr);
});
+ if (BC.isAArch64()) {
+ // Any adr instruction of aarch64 will generate a new entry,
+ // Adr instruction cannt afford to do any optimizations
+ if (!IsEpilogue && !isMultiEntry()) {
+ BinaryBasicBlock::iterator LastDefCFAOffsetInstIter = BB.end();
+ // find the last OpDefCfaOffset 0 instruction.
----------------
paschalis-mpeis wrote:
IIUC, here we get the first `OpDefCfaOffset==0` instruction, right?
nit: Also please begin your comments with a Capital letter, ending with a dot.
https://github.com/llvm/llvm-project/pull/123305
More information about the llvm-commits
mailing list