From fa477d98372cfe4da06a8be6fc687ee8a78800d9 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Thu, 17 Apr 2014 16:19:54 +0000 Subject: [PATCH] [AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206473 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64RegisterInfo.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/AArch64/AArch64RegisterInfo.h b/lib/Target/AArch64/AArch64RegisterInfo.h index bb26f1ac9a6..5e9542a4dcf 100644 --- a/lib/Target/AArch64/AArch64RegisterInfo.h +++ b/lib/Target/AArch64/AArch64RegisterInfo.h @@ -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; -- 2.34.1