[llvm] [RISCV] Implement tail call optimization in machine outliner (PR #115297)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 12:29:31 PST 2024
================
@@ -3041,19 +3073,29 @@ void RISCVInstrInfo::buildOutlinedFrame(
}
}
+ if (OF.FrameConstructionID == MachineOutlinerTailCall)
+ return;
+
MBB.addLiveIn(RISCV::X5);
// Add in a return instruction to the end of the outlined frame.
MBB.insert(MBB.end(), BuildMI(MF, DebugLoc(), get(RISCV::JALR))
- .addReg(RISCV::X0, RegState::Define)
- .addReg(RISCV::X5)
- .addImm(0));
+ .addReg(RISCV::X0, RegState::Define)
+ .addReg(RISCV::X5)
+ .addImm(0));
----------------
ilovepi wrote:
is this intentional?
https://github.com/llvm/llvm-project/pull/115297
More information about the llvm-commits
mailing list