4bfb9a742bdc20c07fa04132f7bcba444d2332b3
1 //===- AMDILRegisterInfo.h - AMDIL 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 AMDIL implementation of the TargetRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef AMDILREGISTERINFO_H_
15 #define AMDILREGISTERINFO_H_
17 #include "llvm/Target/TargetRegisterInfo.h"
19 #define GET_REGINFO_HEADER
20 #include "AMDGPUGenRegisterInfo.inc"
21 // See header file for explanation
26 class TargetInstrInfo
;
29 /// DWARFFlavour - Flavour of dwarf regnumbers
31 namespace DWARFFlavour
{
37 struct AMDILRegisterInfo
: public AMDILGenRegisterInfo
40 const TargetInstrInfo
&TII
;
42 AMDILRegisterInfo(TargetMachine
&tm
, const TargetInstrInfo
&tii
);
43 /// Code Generation virtual methods...
44 const uint16_t * getCalleeSavedRegs(const MachineFunction
*MF
= 0) const;
46 const TargetRegisterClass
* const*
47 getCalleeSavedRegClasses(
48 const MachineFunction
*MF
= 0) const;
51 getReservedRegs(const MachineFunction
&MF
) const;
53 getAllocatableSet(const MachineFunction
&MF
,
54 const TargetRegisterClass
*RC
) const;
57 eliminateCallFramePseudoInstr(
59 MachineBasicBlock
&MBB
,
60 MachineBasicBlock::iterator I
) const;
62 eliminateFrameIndex(MachineBasicBlock::iterator II
,
63 int SPAdj
, RegScavenger
*RS
= NULL
) const;
66 processFunctionBeforeFrameFinalized(MachineFunction
&MF
) const;
68 // Debug information queries.
70 getRARegister() const;
73 getFrameRegister(const MachineFunction
&MF
) const;
75 // Exception handling queries.
77 getEHExceptionRegister() const;
79 getEHHandlerRegister() const;
84 virtual const TargetRegisterClass
* getCFGStructurizerRegClass(MVT VT
)
86 return AMDIL::GPRI32RegisterClass
;
89 mutable int64_t baseOffset
;
90 mutable int64_t nextFuncOffset
;
93 } // end namespace llvm
95 #endif // AMDILREGISTERINFO_H_