[llvm] [RISCV] Implement tail call optimization in machine outliner (PR #115297)
Mark Goncharov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 23:55:44 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.
----------------
mga-sc wrote:
Fixed
https://github.com/llvm/llvm-project/pull/115297
More information about the llvm-commits
mailing list