[C++] Use 'nullptr'.
[oota-llvm.git] / lib / Target / AArch64 / AArch64RegisterInfo.h
index ea538e2bd3effe578e4d0791935ce37b6d6711be..0fbef9485186e0893077c98ffc6ca2a5f5f93d2c 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file contains the AArch64 implementation of the MRegisterInfo class.
+// This file contains the AArch64 implementation of the MCRegisterInfo class.
 //
 //===----------------------------------------------------------------------===//
 
@@ -25,27 +25,26 @@ class AArch64InstrInfo;
 class AArch64Subtarget;
 
 struct AArch64RegisterInfo : public AArch64GenRegisterInfo {
-private:
-  const AArch64InstrInfo &TII;
+  AArch64RegisterInfo();
 
-public:
-  AArch64RegisterInfo(const AArch64InstrInfo &tii,
-                      const AArch64Subtarget &sti);
-
-  const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
+  const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF =nullptr) 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;
   unsigned getFrameRegister(const MachineFunction &MF) const;
 
   void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
-                           RegScavenger *Rs = NULL) const;
-
-  void eliminateCallFramePseudoInstr(MachineFunction &MF,
-                                     MachineBasicBlock &MBB,
-                                     MachineBasicBlock::iterator MI) const;
+                           unsigned FIOperandNum,
+                           RegScavenger *Rs = nullptr) const;
 
   /// getCrossCopyRegClass - Returns a legal register class to copy a register
   /// in the specified class to or from. Returns original class if it is