[llvm] 5d2c3a0 - [AArch64] Disable MachineOutliner on Windows.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 13:49:31 PDT 2020
Author: Eli Friedman
Date: 2020-05-19T13:49:03-07:00
New Revision: 5d2c3a0b8cef545ad69f14264fe0466bb562c66f
URL: https://github.com/llvm/llvm-project/commit/5d2c3a0b8cef545ad69f14264fe0466bb562c66f
DIFF: https://github.com/llvm/llvm-project/commit/5d2c3a0b8cef545ad69f14264fe0466bb562c66f.diff
LOG: [AArch64] Disable MachineOutliner on Windows.
The handling of unwind info is broken, so disable it for now.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/machine-outliner-calls.mir
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 678fe0502fb4..83acf0da7787 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -6106,6 +6106,10 @@ bool AArch64InstrInfo::isFunctionSafeToOutlineFrom(
if (!AFI || AFI->hasRedZone().getValueOr(true))
return false;
+ // FIXME: Teach the outliner to generate/handle Windows unwind info.
+ if (MF.getTarget().getMCAsmInfo()->usesWindowsCFI())
+ return false;
+
// It's safe to outline from MF.
return true;
}
diff --git a/llvm/test/CodeGen/AArch64/machine-outliner-calls.mir b/llvm/test/CodeGen/AArch64/machine-outliner-calls.mir
index 847ccb927f93..6a33bdaa78da 100644
--- a/llvm/test/CodeGen/AArch64/machine-outliner-calls.mir
+++ b/llvm/test/CodeGen/AArch64/machine-outliner-calls.mir
@@ -1,4 +1,5 @@
# RUN: llc -mtriple=aarch64--- -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
+# RUN: llc -mtriple=aarch64-pc-windows-msvc -run-pass=prologepilog -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s -check-prefix=WINDOWS
--- |
define void @baz() #0 {
ret void
@@ -65,3 +66,4 @@ body: |
# CHECK-NEXT: $w17 = ORRWri $wzr, 1
# CHECK-NEXT: early-clobber $sp, $lr = LDRXpost $sp, 16
# CHECK-NEXT: RET $lr
+# WINDOWS-NOT: OUTLINED
More information about the llvm-commits
mailing list