1 //===- AlphaRegisterInfo.h - Alpha 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 Alpha implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef ALPHAREGISTERINFO_H
15 #define ALPHAREGISTERINFO_H
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "AlphaGenRegisterInfo.inc"
24 class TargetInstrInfo
;
27 struct AlphaRegisterInfo
: public AlphaGenRegisterInfo
{
28 const TargetInstrInfo
&TII
;
30 AlphaRegisterInfo(const TargetInstrInfo
&tii
);
32 /// Code Generation virtual methods...
33 const unsigned *getCalleeSavedRegs(const MachineFunction
*MF
= 0) const;
35 BitVector
getReservedRegs(const MachineFunction
&MF
) const;
37 void eliminateCallFramePseudoInstr(MachineFunction
&MF
,
38 MachineBasicBlock
&MBB
,
39 MachineBasicBlock::iterator I
) const;
41 void eliminateFrameIndex(MachineBasicBlock::iterator II
,
42 int SPAdj
, RegScavenger
*RS
= NULL
) const;
44 // Debug information queries.
45 unsigned getRARegister() const;
46 unsigned getFrameRegister(const MachineFunction
&MF
) const;
48 // Exception handling queries.
49 unsigned getEHExceptionRegister() const;
50 unsigned getEHHandlerRegister() const;
52 int getDwarfRegNum(unsigned RegNum
, bool isEH
) const;
53 int getLLVMRegNum(unsigned RegNum
, bool isEH
) const;
55 static std::string
getPrettyName(unsigned reg
);
58 } // end namespace llvm