1 //===- IA64RegisterInfo.h - IA64 Register Information Impl ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Duraid Madina and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the IA64 implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef IA64REGISTERINFO_H
15 #define IA64REGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "IA64GenRegisterInfo.h.inc"
20 namespace llvm { class llvm::Type; }
24 class TargetInstrInfo;
26 struct IA64RegisterInfo : public IA64GenRegisterInfo {
27 const TargetInstrInfo &TII;
29 IA64RegisterInfo(const TargetInstrInfo &tii);
31 /// Code Generation virtual methods...
32 void storeRegToStackSlot(MachineBasicBlock &MBB,
33 MachineBasicBlock::iterator MI,
34 unsigned SrcReg, int FrameIndex,
35 const TargetRegisterClass *RC) const;
37 void loadRegFromStackSlot(MachineBasicBlock &MBB,
38 MachineBasicBlock::iterator MI,
39 unsigned DestReg, int FrameIndex,
40 const TargetRegisterClass *RC) const;
42 void copyRegToReg(MachineBasicBlock &MBB,
43 MachineBasicBlock::iterator MI,
44 unsigned DestReg, unsigned SrcReg,
45 const TargetRegisterClass *RC) const;
47 void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
48 unsigned DestReg, const MachineInstr *Orig) const;
50 const unsigned *getCalleeSavedRegs() const;
52 const TargetRegisterClass* const* getCalleeSavedRegClasses() const;
54 BitVector getReservedRegs(const MachineFunction &MF) const;
56 bool hasFP(const MachineFunction &MF) const;
58 void eliminateCallFramePseudoInstr(MachineFunction &MF,
59 MachineBasicBlock &MBB,
60 MachineBasicBlock::iterator MI) const;
62 void eliminateFrameIndex(MachineBasicBlock::iterator MI,
63 RegScavenger *RS = NULL) const;
65 void emitPrologue(MachineFunction &MF) const;
66 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
68 // Debug information queries.
69 unsigned getRARegister() const;
70 unsigned getFrameRegister(MachineFunction &MF) const;
72 // Exception handling queries.
73 unsigned getEHExceptionRegister() const;
74 unsigned getEHHandlerRegister() const;
77 } // End llvm namespace