[llvm] [X86] Stop emitting CFI instructions on i386-windows (PR #135648)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 13 02:06:51 PDT 2025


================
@@ -1468,7 +1468,9 @@ bool X86FrameLowering::isWin64Prologue(const MachineFunction &MF) const {
 }
 
 bool X86FrameLowering::needsDwarfCFI(const MachineFunction &MF) const {
-  return !isWin64Prologue(MF) && MF.needsFrameMoves();
+  return MF.getTarget().getMCAsmInfo()->getExceptionHandlingType() !=
----------------
s-barannikov wrote:

`usesWindowsCFI() == (getExceptionHandlingType() == WinEH && 64-bit)`

This change effectively removes the second part of the check so that
`needsDwarfCFI()` doesn't return true for WinEH && **32**-bit.

Or did you mean I should add a code comment?


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


More information about the llvm-commits mailing list