summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2014-04-17 16:19:54 +0000
committerChad Rosier <mcrosier@codeaurora.org>2014-04-17 16:19:54 +0000
commitfa477d98372cfe4da06a8be6fc687ee8a78800d9 (patch)
treefeab6b154f3600c502fc16a27316c19ad11ed2b4 /lib
parent207be301e37ec95ba0cfe53d927c47722ee3e3ce (diff)
downloadllvm-fa477d98372cfe4da06a8be6fc687ee8a78800d9.tar.gz
llvm-fa477d98372cfe4da06a8be6fc687ee8a78800d9.tar.bz2
llvm-fa477d98372cfe4da06a8be6fc687ee8a78800d9.tar.xz
[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
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/AArch64/AArch64RegisterInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AArch64RegisterInfo.h b/lib/Target/AArch64/AArch64RegisterInfo.h
index bb26f1ac9a..5e9542a4dc 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;