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

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 03:38:01 PDT 2024


================
@@ -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();
----------------
s-barannikov wrote:

I believe most of M68k's frame lowering was adapted from X86, and the corresponding line was changed by [this commit](https://github.com/llvm/llvm-project/commit/92aa0c2dbcb723d102c508f6e7559330b637f912#diff-cb2c035d093ee8f54d6c174ebb5ecf7f6d91ac5e79c856a684cd86a8ead49338) 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?


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


More information about the llvm-commits mailing list