From 81afb6570000472c182e5b1f540f69382602aaad Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Mon, 24 Aug 2026 17:30:29 +0800 Subject: [RISCV] Match LLVM emergency spill layout --- backend/lib/CodeGen/PrologueEpilogueInsertion.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'backend/lib/CodeGen/PrologueEpilogueInsertion.cpp') diff --git a/backend/lib/CodeGen/PrologueEpilogueInsertion.cpp b/backend/lib/CodeGen/PrologueEpilogueInsertion.cpp index 4dc40c0..1a244ed 100644 --- a/backend/lib/CodeGen/PrologueEpilogueInsertion.cpp +++ b/backend/lib/CodeGen/PrologueEpilogueInsertion.cpp @@ -55,7 +55,7 @@ Expected PrologueEpilogueInsertionPass::run(MachineFunction & MachineFunctionCloneOptions{.NewStableID = Function.stableID(), .NewName = std::nullopt}); if (!Trial) return std::unexpected(withErrorContext(Trial.error(), "frame transaction setup failed: ")); - auto TrialRun = runImplementation(*Trial->ClonedFunction, Target); + auto TrialRun = runImplementation(*Trial->ClonedFunction, Target, {}); if (!TrialRun) return std::unexpected( withErrorContext(TrialRun.error(), "frame transaction rejected input: ")); @@ -75,7 +75,7 @@ Expected PrologueEpilogueInsertionPass::run(MachineFunction & withErrorContext(Verified.error(), "frame transaction postcondition failed: ")); } - auto Result = runImplementation(Function, Target); + auto Result = runImplementation(Function, Target, Options); if (!Result) { return std::unexpected(withErrorContext( Result.error(), "frame lowering diverged after successful transaction preflight: ")); @@ -85,8 +85,9 @@ Expected PrologueEpilogueInsertionPass::run(MachineFunction & Expected PrologueEpilogueInsertionPass::runImplementation(MachineFunction &Function, - const TargetDescription &Target) const { - auto Prepared = Info->prepareFrame(Function, Target); + const TargetDescription &Target, + FrameLoweringOptions RunOptions) const { + auto Prepared = Info->prepareFrame(Function, Target, RunOptions); if (!Prepared) return std::unexpected(Prepared.error()); -- cgit v1.2.3