1 //===-- XCoreRegisterInfo.h - XCore Register Information Impl ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the XCore implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef XCOREREGISTERINFO_H
15 #define XCOREREGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "XCoreGenRegisterInfo.inc"
24 class TargetInstrInfo;
26 struct XCoreRegisterInfo : public XCoreGenRegisterInfo {
28 void loadConstant(MachineBasicBlock &MBB,
29 MachineBasicBlock::iterator I,
30 unsigned DstReg, int64_t Value, DebugLoc dl) const;
32 void storeToStack(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator I,
34 unsigned SrcReg, int Offset, DebugLoc dl) const;
36 void loadFromStack(MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator I,
38 unsigned DstReg, int Offset, DebugLoc dl) const;
43 /// Code Generation virtual methods...
45 const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
47 BitVector getReservedRegs(const MachineFunction &MF) const;
49 bool requiresRegisterScavenging(const MachineFunction &MF) const;
51 bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const;
53 bool useFPForScavengingIndex(const MachineFunction &MF) const;
55 void eliminateFrameIndex(MachineBasicBlock::iterator II,
56 int SPAdj, unsigned FIOperandNum,
57 RegScavenger *RS = NULL) const;
59 // Debug information queries.
60 unsigned getFrameRegister(const MachineFunction &MF) const;
62 //! Return whether to emit frame moves
63 static bool needsFrameMoves(const MachineFunction &MF);
66 } // end namespace llvm