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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 03:04:47 PDT 2024


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/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.

>From 23815a3e47320324fbbf6e327ba5325539e2d2f5 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sat, 20 Jul 2024 13:49:19 +0400
Subject: [PATCH] M68k: Remove hasDebugInfo check when deciding to emit CFI

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.
---
 llvm/lib/Target/M68k/M68kFrameLowering.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/lib/Target/M68k/M68kFrameLowering.cpp b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
index 36443f9d33451..a609be08d3021 100644
--- a/llvm/lib/Target/M68k/M68kFrameLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
@@ -246,9 +246,8 @@ 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 = Fn.needsUnwindTableEntry();
 
     // 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