SystemZRegisterInfo.h revision 0e6a052331f674dd70e28af41f654a7874405eab
1//===-- SystemZRegisterInfo.h - SystemZ Register Information ----*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the SystemZ implementation of the TargetRegisterInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SystemZREGISTERINFO_H
15#define SystemZREGISTERINFO_H
16
17#include "llvm/Target/TargetRegisterInfo.h"
18
19#define GET_REGINFO_HEADER
20#include "SystemZGenRegisterInfo.inc"
21
22namespace llvm {
23
24class SystemZSubtarget;
25class SystemZInstrInfo;
26class Type;
27
28struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
29  SystemZTargetMachine &TM;
30  const SystemZInstrInfo &TII;
31
32  SystemZRegisterInfo(SystemZTargetMachine &tm, const SystemZInstrInfo &tii);
33
34  /// Code Generation virtual methods...
35  const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
36
37  BitVector getReservedRegs(const MachineFunction &MF) const;
38
39  const TargetRegisterClass*
40  getMatchingSuperRegClass(const TargetRegisterClass *A,
41                           const TargetRegisterClass *B, unsigned Idx) const;
42
43  void eliminateCallFramePseudoInstr(MachineFunction &MF,
44                                     MachineBasicBlock &MBB,
45                                     MachineBasicBlock::iterator I) const;
46
47  void eliminateFrameIndex(MachineBasicBlock::iterator II,
48                           int SPAdj, RegScavenger *RS = NULL) const;
49
50  // Debug information queries.
51  unsigned getFrameRegister(const MachineFunction &MF) const;
52
53  // Exception handling queries.
54  unsigned getEHExceptionRegister() const;
55  unsigned getEHHandlerRegister() const;
56};
57
58} // end namespace llvm
59
60#endif
61