[llvm] r206473 - [AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64.
Chad Rosier
mcrosier at codeaurora.org
Thu Apr 17 09:19:54 PDT 2014
Author: mcrosier
Date: Thu Apr 17 11:19:54 2014
New Revision: 206473
URL: http://llvm.org/viewvc/llvm-project?rev=206473&view=rev
Log:
[AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.h
Modified: llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.h?rev=206473&r1=206472&r2=206473&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64RegisterInfo.h Thu Apr 17 11:19:54 2014
@@ -30,6 +30,13 @@ struct AArch64RegisterInfo : public AArc
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;
More information about the llvm-commits
mailing list