[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:40:29 PDT 2024


https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/99750

>From 35126c123fd78196648b19ae052e46fd60195fe2 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 directly, and this is untested. Use needsFrameMoves,
which covers both conditions already and is what most other targets consider.
---
 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..525fbf4878dd7 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 = 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