[llvm] [llvm][X86] AvoidTrailingCallPass for UEFI (PR #138363)
Prabhu Rajasekaran via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 16:35:26 PDT 2025
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/138363
Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.
>From 04407731a76dbc18babd0c31aa6307ce3f81933d Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Fri, 2 May 2025 23:32:58 +0000
Subject: [PATCH] [llvm][X86] AvoidTrailingCallPass for UEFI
Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.
---
llvm/lib/Target/X86/X86AvoidTrailingCall.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
index 2ecf49382d29f..3aea3704c46ed 100644
--- a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
+++ b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
@@ -82,7 +82,8 @@ static bool isCallInstruction(const MachineInstr &MI) {
bool X86AvoidTrailingCallPass::runOnMachineFunction(MachineFunction &MF) {
const X86Subtarget &STI = MF.getSubtarget<X86Subtarget>();
const X86InstrInfo &TII = *STI.getInstrInfo();
- assert(STI.isTargetWin64() && "pass only runs on Win64");
+ assert((STI.isTargetWin64() || STI.isTargetUEFI64()) &&
+ "pass only runs on Win64 and UEFI64");
// We don't need to worry about any of the invariants described above if there
// is no unwind info (CFI).
More information about the llvm-commits
mailing list