[AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64.

llvm-svn: 206473
This commit is contained in:
Chad Rosier 2014-04-17 16:19:54 +00:00
parent 67d9c8c87e
commit c4eb4f8827
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,13 @@ struct AArch64RegisterInfo : public AArch64GenRegisterInfo {
const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
unsigned getCSRFirstUseCost() const {
// The cost will be compared against BlockFrequency where entry has the
// value of 1 << 14. A value of 5 will choose to spill or split really
// cold path instead of using a callee-saved register.
return 5;
}
const uint32_t *getTLSDescCallPreservedMask() const;
BitVector getReservedRegs(const MachineFunction &MF) const;