1 //===-- SystemZRegisterInfo.h - SystemZ Register Information ----*- 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 SystemZ implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef SystemZREGISTERINFO_H
15 #define SystemZREGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "SystemZGenRegisterInfo.inc"
24 class SystemZSubtarget
;
25 class SystemZInstrInfo
;
28 struct SystemZRegisterInfo
: public SystemZGenRegisterInfo
{
29 SystemZTargetMachine
&TM
;
30 const SystemZInstrInfo
&TII
;
32 SystemZRegisterInfo(SystemZTargetMachine
&tm
, const SystemZInstrInfo
&tii
);
34 /// Code Generation virtual methods...
35 const unsigned *getCalleeSavedRegs(const MachineFunction
*MF
= 0) const;
37 BitVector
getReservedRegs(const MachineFunction
&MF
) const;
39 const TargetRegisterClass
*
40 getMatchingSuperRegClass(const TargetRegisterClass
*A
,
41 const TargetRegisterClass
*B
, unsigned Idx
) const;
43 void eliminateCallFramePseudoInstr(MachineFunction
&MF
,
44 MachineBasicBlock
&MBB
,
45 MachineBasicBlock::iterator I
) const;
47 void eliminateFrameIndex(MachineBasicBlock::iterator II
,
48 int SPAdj
, RegScavenger
*RS
= NULL
) const;
50 // Debug information queries.
51 unsigned getRARegister() const;
52 unsigned getFrameRegister(const MachineFunction
&MF
) const;
54 // Exception handling queries.
55 unsigned getEHExceptionRegister() const;
56 unsigned getEHHandlerRegister() const;
58 int getDwarfRegNum(unsigned RegNum
, bool isEH
) const;
59 int getLLVMRegNum(unsigned RegNum
, bool isEH
) const;
62 } // end namespace llvm