Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[llvm] Allow Fast and Tail CC in UEFI #138361

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 5 commits into from
May 6, 2025
Merged

Conversation

Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented May 2, 2025

Allow tail call and fastcc optimizations for UEFI X86_64 targets.

Allow tail call and fastcc optimizations for UEFI X86_64 targets.
@llvmbot
Copy link
Member

llvmbot commented May 2, 2025

@llvm/pr-subscribers-backend-x86

Author: Prabhu Rajasekaran (Prabhuk)

Changes

Allow tail call and fastcc optimizations for UEFI X86_64 targets.


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

1 Files Affected:

  • (modified) llvm/lib/Target/X86/X86Subtarget.h (+1-1)
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index a0b182d3f4c9b..c2b7d3780a983 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -352,9 +352,9 @@ class X86Subtarget final : public X86GenSubtargetInfo {
     switch (CC) {
     // On Win64, all these conventions just use the default convention.
     case CallingConv::C:
-      return isTargetWin64() || isTargetUEFI64();
     case CallingConv::Fast:
     case CallingConv::Tail:
+      return isTargetWin64() || isTargetUEFI64();
     case CallingConv::Swift:
     case CallingConv::SwiftTail:
     case CallingConv::X86_FastCall:

@RKSimon
Copy link
Collaborator

RKSimon commented May 4, 2025

test coverage?

@Prabhuk Prabhuk requested a review from RKSimon May 5, 2025 22:25
@Prabhuk
Copy link
Contributor Author

Prabhuk commented May 5, 2025

test coverage?

Thank you. Added tests. One of the tests will fail until #138602 lands.

@Prabhuk Prabhuk merged commit 0a07e6b into llvm:main May 6, 2025
9 of 10 checks passed
@Prabhuk Prabhuk deleted the uefi_fasttail branch May 6, 2025 23:50
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
Allow tail call and fastcc optimizations for UEFI X86_64 targets.
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.

5 participants