[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 04:24:56 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 1/2] 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
>From bb60c3e64b59dfefa5af7049fe384d9a42e1e66b Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sat, 20 Jul 2024 15:24:24 +0400
Subject: [PATCH 2/2] Remove unused variable
---
llvm/lib/Target/M68k/M68kFrameLowering.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/llvm/lib/Target/M68k/M68kFrameLowering.cpp b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
index 525fbf4878dd7..c548346f35a2f 100644
--- a/llvm/lib/Target/M68k/M68kFrameLowering.cpp
+++ b/llvm/lib/Target/M68k/M68kFrameLowering.cpp
@@ -246,7 +246,6 @@ MachineBasicBlock::iterator M68kFrameLowering::eliminateCallFramePseudoInstr(
unsigned StackAlign = getStackAlignment();
Amount = alignTo(Amount, StackAlign);
- const auto &Fn = MF.getFunction();
bool DwarfCFI = MF.needsFrameMoves();
// If we have any exception handlers in this function, and we adjust
More information about the llvm-commits
mailing list