1 //===- ThumbRegisterInfo.h - Thumb 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 ARM implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef THUMBREGISTERINFO_H
15 #define THUMBREGISTERINFO_H
18 #include "ARMRegisterInfo.h"
19 #include "llvm/Target/TargetRegisterInfo.h"
23 class TargetInstrInfo;
26 struct ThumbRegisterInfo : public ARMBaseRegisterInfo {
28 ThumbRegisterInfo(const TargetInstrInfo &tii, const ARMSubtarget &STI);
30 /// emitLoadConstPool - Emits a load from constpool to materialize the
31 /// specified immediate.
32 void emitLoadConstPool(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator &MBBI,
34 unsigned DestReg, int Val,
35 const TargetInstrInfo *TII,
38 /// Code Generation virtual methods...
39 const TargetRegisterClass *
40 getPhysicalRegisterRegClass(unsigned Reg, MVT VT = MVT::Other) const;
42 bool isReservedReg(const MachineFunction &MF, unsigned Reg) const;
44 bool requiresRegisterScavenging(const MachineFunction &MF) const;
46 bool hasReservedCallFrame(MachineFunction &MF) const;
48 void eliminateCallFramePseudoInstr(MachineFunction &MF,
49 MachineBasicBlock &MBB,
50 MachineBasicBlock::iterator I) const;
52 void eliminateFrameIndex(MachineBasicBlock::iterator II,
53 int SPAdj, RegScavenger *RS = NULL) const;
55 void emitPrologue(MachineFunction &MF) const;
56 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
60 #endif // THUMBREGISTERINFO_H