mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-17 00:50:58 +00:00
[AArch64] Remove check for Darwin that was needed to decide if x18 should
be reserved. The decision to reserve x18 is going to be made solely by the front-end, so it isn't necessary to check if the OS is Darwin in the backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb30d38ac8
commit
6e208e96cc
@ -100,7 +100,7 @@ AArch64RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
Reserved.set(AArch64::W29);
|
||||
}
|
||||
|
||||
if (TT.isOSDarwin() || MF.getSubtarget<AArch64Subtarget>().isX18Reserved()) {
|
||||
if (MF.getSubtarget<AArch64Subtarget>().isX18Reserved()) {
|
||||
Reserved.set(AArch64::X18); // Platform register
|
||||
Reserved.set(AArch64::W18);
|
||||
}
|
||||
@ -127,8 +127,7 @@ bool AArch64RegisterInfo::isReservedReg(const MachineFunction &MF,
|
||||
return true;
|
||||
case AArch64::X18:
|
||||
case AArch64::W18:
|
||||
return TT.isOSDarwin() ||
|
||||
MF.getSubtarget<AArch64Subtarget>().isX18Reserved();
|
||||
return MF.getSubtarget<AArch64Subtarget>().isX18Reserved();
|
||||
case AArch64::FP:
|
||||
case AArch64::W29:
|
||||
return TFI->hasFP(MF) || TT.isOSDarwin();
|
||||
@ -398,12 +397,11 @@ unsigned AArch64RegisterInfo::getRegPressureLimit(const TargetRegisterClass *RC,
|
||||
case AArch64::GPR64RegClassID:
|
||||
case AArch64::GPR32commonRegClassID:
|
||||
case AArch64::GPR64commonRegClassID:
|
||||
return 32 - 1 // XZR/SP
|
||||
- (TFI->hasFP(MF) || TT.isOSDarwin()) // FP
|
||||
- (TT.isOSDarwin() ||
|
||||
MF.getSubtarget<AArch64Subtarget>()
|
||||
.isX18Reserved()) // X18 reserved as platform register
|
||||
- hasBasePointer(MF); // X19
|
||||
return 32 - 1 // XZR/SP
|
||||
- (TFI->hasFP(MF) || TT.isOSDarwin()) // FP
|
||||
- MF.getSubtarget<AArch64Subtarget>()
|
||||
.isX18Reserved() // X18 reserved as platform register
|
||||
- hasBasePointer(MF); // X19
|
||||
case AArch64::FPR8RegClassID:
|
||||
case AArch64::FPR16RegClassID:
|
||||
case AArch64::FPR32RegClassID:
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18
|
||||
; RUN: llc -mtriple=arm64-apple-ios -mattr=+reserve-x18 -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18
|
||||
; RUN: llc -mtriple=arm64-freebsd-gnu -mattr=+reserve-x18 -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18
|
||||
; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: llc -mtriple=arm64-apple-darwin < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=arm64-apple-darwin -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=arm64-apple-darwin -mattr=+reserve-x18 < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=arm64-apple-darwin -mattr=+reserve-x18 -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
|
||||
;
|
||||
; Note: Print verbose stackmaps using -debug-only=stackmaps.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user