mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Fix ARM hasFP() semantics. It should return true whenever FP register is
reserved, not available for general allocation. This eliminates all the extra checks for Darwin. This change also fixes the use of FP to access frame indices in leaf functions and cleaned up some confusing code in epilogue emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -742,14 +742,15 @@ Sched::Preference ARMTargetLowering::getSchedulingPreference(SDNode *N) const {
|
||||
unsigned
|
||||
ARMTargetLowering::getRegPressureLimit(const TargetRegisterClass *RC,
|
||||
MachineFunction &MF) const {
|
||||
unsigned FPDiff = RegInfo->hasFP(MF) ? 1 : 0;
|
||||
switch (RC->getID()) {
|
||||
default:
|
||||
return 0;
|
||||
case ARM::tGPRRegClassID:
|
||||
return 5 - FPDiff;
|
||||
case ARM::GPRRegClassID:
|
||||
return 10 - FPDiff - (Subtarget->isR9Reserved() ? 1 : 0);
|
||||
return RegInfo->hasFP(MF) ? 4 : 5;
|
||||
case ARM::GPRRegClassID: {
|
||||
unsigned FP = RegInfo->hasFP(MF) ? 1 : 0;
|
||||
return 10 - FP - (Subtarget->isR9Reserved() ? 1 : 0);
|
||||
}
|
||||
case ARM::SPRRegClassID: // Currently not used as 'rep' register class.
|
||||
case ARM::DPRRegClassID:
|
||||
return 32 - 10;
|
||||
|
Reference in New Issue
Block a user