Have getRegPressureSetLimit take a MachineFunction so that a

we can inspect the subtarget and function when computing values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2015-03-11 18:34:58 +00:00
parent 9c2d178707
commit 138fe781d2
5 changed files with 11 additions and 7 deletions

View File

@ -176,6 +176,6 @@ unsigned RegisterClassInfo::computePSetLimit(unsigned Idx) const {
}
compute(RC);
unsigned NReserved = RC->getNumRegs() - getNumAllocatableRegs(RC);
return TRI->getRegPressureSetLimit(Idx)
- TRI->getRegClassWeight(RC).RegWeight * NReserved;
return TRI->getRegPressureSetLimit(*MF, Idx) -
TRI->getRegClassWeight(RC).RegWeight * NReserved;
}