From d7938b1a817006388f95de5ea2ee74daa7cde892 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sun, 17 Apr 2022 10:47:38 -0400 Subject: MachineModuleInfo: Move HasSplitStack handling to AsmPrinter This is used to emit one field in doFinalization for the module. We can accumulate this when emitting all individual functions directly in the AsmPrinter, rather than accumulating additional state in MachineModuleInfo. Move the special case behavior predicate into MachineFrameInfo to share it. This now promotes it to generic behavior. I'm assuming this is fine because no other target implements adjustForSegmentedStacks, or has tests using the split-stack attribute. --- llvm/lib/CodeGen/PrologEpilogInserter.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp') diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 6e0c867..ee22cbd 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1144,11 +1144,7 @@ void PEI::insertPrologEpilogCode(MachineFunction &MF) { if (MF.shouldSplitStack()) { for (MachineBasicBlock *SaveBlock : SaveBlocks) TFI.adjustForSegmentedStacks(MF, *SaveBlock); - // Record that there are split-stack functions, so we will emit a - // special section to tell the linker. - MF.getMMI().setHasSplitStack(true); - } else - MF.getMMI().setHasNosplitStack(true); + } // Emit additional code that is required to explicitly handle the stack in // HiPE native code (if needed) when loaded in the Erlang/OTP runtime. The -- cgit v1.1