1 //===- MSP430RegisterInfo.h - MSP430 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 MSP430 implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_MSP430REGISTERINFO_H
15 #define LLVM_TARGET_MSP430REGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "MSP430GenRegisterInfo.inc"
24 class TargetInstrInfo;
25 class MSP430TargetMachine;
27 struct MSP430RegisterInfo : public MSP430GenRegisterInfo {
29 MSP430TargetMachine &TM;
30 const TargetInstrInfo &TII;
32 /// StackAlign - Default stack alignment.
36 MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii);
38 /// Code Generation virtual methods...
39 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
41 BitVector getReservedRegs(const MachineFunction &MF) const;
42 const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
44 void eliminateCallFramePseudoInstr(MachineFunction &MF,
45 MachineBasicBlock &MBB,
46 MachineBasicBlock::iterator I) const;
48 void eliminateFrameIndex(MachineBasicBlock::iterator II,
49 int SPAdj, RegScavenger *RS = NULL) const;
51 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
53 // Debug information queries.
54 unsigned getFrameRegister(const MachineFunction &MF) const;
57 } // end namespace llvm
59 #endif // LLVM_TARGET_MSP430REGISTERINFO_H