1 //===- ARMRegisterInfo.h - ARM Register Information Impl --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the "Instituto Nokia de Tecnologia" and
6 // is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 // This file contains the ARM implementation of the MRegisterInfo class.
13 //===----------------------------------------------------------------------===//
15 #ifndef ARMREGISTERINFO_H
16 #define ARMREGISTERINFO_H
18 #include "llvm/Target/MRegisterInfo.h"
19 #include "ARMGenRegisterInfo.h.inc"
24 class TargetInstrInfo;
26 struct ARMRegisterInfo : public ARMGenRegisterInfo {
27 const TargetInstrInfo &TII;
29 ARMRegisterInfo(const TargetInstrInfo &tii);
31 /// Code Generation virtual methods...
32 void storeRegToStackSlot(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator MBBI,
34 unsigned SrcReg, int FrameIndex,
35 const TargetRegisterClass *RC) const;
37 void loadRegFromStackSlot(MachineBasicBlock &MBB,
38 MachineBasicBlock::iterator MBBI,
39 unsigned DestReg, int FrameIndex,
40 const TargetRegisterClass *RC) const;
42 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
43 unsigned DestReg, unsigned SrcReg,
44 const TargetRegisterClass *RC) const;
46 virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
48 int FrameIndex) const;
50 const unsigned *getCalleeSavedRegs() const;
52 const TargetRegisterClass* const* getCalleeSavedRegClasses() const;
54 void eliminateCallFramePseudoInstr(MachineFunction &MF,
55 MachineBasicBlock &MBB,
56 MachineBasicBlock::iterator I) const;
58 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
60 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
62 void emitPrologue(MachineFunction &MF) const;
63 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
65 // Debug information queries.
66 unsigned getRARegister() const;
67 unsigned getFrameRegister(MachineFunction &MF) const;
70 } // end namespace llvm