[llvm] [RISCV] Implement tail call optimization in machine outliner (PR #115297)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 19:47:54 PST 2024
================
@@ -2961,6 +2990,17 @@ RISCVInstrInfo::getOutliningCandidateInfo(
for (auto &MI : RepeatedSequenceLocs[0])
SequenceSize += getInstSizeInBytes(MI);
+ if (!cannotInsertTailCall(RepeatedSequenceLocs[0].back())) {
+ // tail function = 8 bytes. Can't be compressed
+ for (auto &C : RepeatedSequenceLocs)
+ C.setCallInfo(MachineOutlinerTailCall, 8);
+
+ // Using tail call we move ret instruction from caller to calle.
----------------
topperc wrote:
callee*
https://github.com/llvm/llvm-project/pull/115297
More information about the llvm-commits
mailing list