-
Notifications
You must be signed in to change notification settings - Fork 14.3k
M68k: Remove hasDebugInfo check when deciding to emit CFI #99750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@llvm/pr-subscribers-backend-m68k Author: Matt Arsenault (arsenm) ChangesNo other target checks this, and this is untested. I am trying Full diff: https://github.com/llvm/llvm-project/pull/99750.diff 1 Files Affected:
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
|
No other target checks this directly, and this is untested. Use needsFrameMoves, which covers both conditions already and is what most other targets consider.
const auto &Fn = MF.getFunction(); | ||
bool DwarfCFI = MMI.hasDebugInfo() || Fn.needsUnwindTableEntry(); | ||
bool DwarfCFI = Fn.needsUnwindTableEntry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe most of M68k's frame lowering was adapted from X86, and the corresponding line was changed by this commit to MF.needsFrameMoves()
. I'm not sure this is the correct method to use, but at least using it would be consistent.
By the way, needsFrameMoves
calls MF.getMMI()
. Is there a plan on how to get rid of this call?
23815a3
to
35126c1
Compare
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251413
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.