[llvm] a03935b - M68k: Remove hasDebugInfo check when deciding to emit CFI (#99750)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 04:56:42 PDT 2024


Author: Matt Arsenault
Date: 2024-07-20T15:56:38+04:00
New Revision: a03935b9841c4e30b27dd9399e0b93191ad443f3

URL: https://github.com/llvm/llvm-project/commit/a03935b9841c4e30b27dd9399e0b93191ad443f3
DIFF: https://github.com/llvm/llvm-project/commit/a03935b9841c4e30b27dd9399e0b93191ad443f3.diff

LOG: M68k: Remove hasDebugInfo check when deciding to emit CFI (#99750)

No other target checks this, and this is untested. I am trying
to remove the MachineModuleInfo reference from MachineFunction,
and this is the stickiest blocker.

Added: 
    

Modified: 
    llvm/lib/Target/M68k/M68kFrameLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/M68k/M68kFrameLowering.cpp b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
index 36443f9d33451..c548346f35a2f 100644
--- a/llvm/lib/Target/M68k/M68kFrameLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
@@ -246,9 +246,7 @@ MachineBasicBlock::iterator M68kFrameLowering::eliminateCallFramePseudoInstr(
     unsigned StackAlign = getStackAlignment();
     Amount = alignTo(Amount, StackAlign);
 
-    MachineModuleInfo &MMI = MF.getMMI();
-    const auto &Fn = MF.getFunction();
-    bool DwarfCFI = MMI.hasDebugInfo() || Fn.needsUnwindTableEntry();
+    bool DwarfCFI = MF.needsFrameMoves();
 
     // If we have any exception handlers in this function, and we adjust
     // the SP before calls, we may need to indicate this to the unwinder


        


More information about the llvm-commits mailing list