Skip to content

[llvm] No DWARF CFI for UEFI #138602

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

Merged
merged 1 commit into from
May 6, 2025
Merged

[llvm] No DWARF CFI for UEFI #138602

merged 1 commit into from
May 6, 2025

Conversation

Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented May 5, 2025

UEFI target uses WinCFI. Update emitEpilogue function to reflect this.

UEFI target uses WinCFI. Update emitEpilogue function to reflect this.
@llvmbot
Copy link
Member

llvmbot commented May 5, 2025

@llvm/pr-subscribers-backend-x86

Author: Prabhu Rajasekaran (Prabhuk)

Changes

UEFI target uses WinCFI. Update emitEpilogue function to reflect this.


Full diff: https://github.com/llvm/llvm-project/pull/138602.diff

1 Files Affected:

  • (modified) llvm/lib/Target/X86/X86FrameLowering.cpp (+2-1)
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index b7374558604ec..7e960c6420d3b 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -2431,7 +2431,8 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
   uint64_t NumBytes = 0;
 
   bool NeedsDwarfCFI = (!MF.getTarget().getTargetTriple().isOSDarwin() &&
-                        !MF.getTarget().getTargetTriple().isOSWindows()) &&
+                        !MF.getTarget().getTargetTriple().isOSWindows() &&
+                        !MF.getTarget().getTargetTriple().isUEFI()) &&
                        MF.needsFrameMoves();
 
   Register ArgBaseReg;

@Prabhuk Prabhuk merged commit 6234aba into llvm:main May 6, 2025
11 of 13 checks passed
@@ -2431,7 +2431,8 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
uint64_t NumBytes = 0;

bool NeedsDwarfCFI = (!MF.getTarget().getTargetTriple().isOSDarwin() &&
!MF.getTarget().getTargetTriple().isOSWindows()) &&
!MF.getTarget().getTargetTriple().isOSWindows() &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a test. You might check whether there is a test that covers isOSDarwin/isOSWindows

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I'll look. Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI there are a couple of e2e tests that cover this change. One under review: https://github.com/llvm/llvm-project/pull/138362/files#diff-e47f971f8f461b56fd6688777c1e931fa02aa2e27cb6002f8575a1f9baa2dc26

Another one landed: https://github.com/llvm/llvm-project/pull/138361/files#diff-794c27548ad64f38994f367a0552e6b83511f1861924bd2cf42083aae690c569

But I'll continue to look if I can add a more targeted test.

GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
UEFI target uses WinCFI. Update emitEpilogue function to reflect this.
@Prabhuk Prabhuk deleted the uefi_nodwarfcfi branch May 14, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants