1 //===-- R600RegisterInfo.h - R600 Register Info Interface ------*- 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 //===----------------------------------------------------------------------===//
11 /// Interface definition for R600RegisterInfo
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
16 #define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
18 #define GET_REGINFO_HEADER
19 #include "R600GenRegisterInfo.inc"
23 struct R600RegisterInfo final
: public R600GenRegisterInfo
{
28 BitVector
getReservedRegs(const MachineFunction
&MF
) const override
;
29 const MCPhysReg
*getCalleeSavedRegs(const MachineFunction
*MF
) const override
;
30 unsigned getFrameRegister(const MachineFunction
&MF
) const override
;
32 /// get the HW encoding for a register's channel.
33 unsigned getHWRegChan(unsigned reg
) const;
35 unsigned getHWRegIndex(unsigned Reg
) const;
37 /// get the register class of the specified type to use in the
39 const TargetRegisterClass
*getCFGStructurizerRegClass(MVT VT
) const;
41 const RegClassWeight
&
42 getRegClassWeight(const TargetRegisterClass
*RC
) const override
;
44 // \returns true if \p Reg can be defined in one ALU clause and used in
46 bool isPhysRegLiveAcrossClauses(unsigned Reg
) const;
48 void eliminateFrameIndex(MachineBasicBlock::iterator MI
, int SPAdj
,
49 unsigned FIOperandNum
,
50 RegScavenger
*RS
= nullptr) const override
;
52 void reserveRegisterTuples(BitVector
&Reserved
, unsigned Reg
) const;
55 } // End namespace llvm