1 //===-- R600RegisterInfo.h - R600 Register Info Interface ------*- C++ -*--===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Interface definition for R600RegisterInfo
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
15 #define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
17 #define GET_REGINFO_HEADER
18 #include "R600GenRegisterInfo.inc"
22 struct R600RegisterInfo final
: public R600GenRegisterInfo
{
27 BitVector
getReservedRegs(const MachineFunction
&MF
) const override
;
28 const MCPhysReg
*getCalleeSavedRegs(const MachineFunction
*MF
) const override
;
29 Register
getFrameRegister(const MachineFunction
&MF
) const override
;
31 /// get the HW encoding for a register's channel.
32 unsigned getHWRegChan(unsigned reg
) const;
34 unsigned getHWRegIndex(unsigned Reg
) const;
36 /// get the register class of the specified type to use in the
38 const TargetRegisterClass
*getCFGStructurizerRegClass(MVT VT
) const;
40 const RegClassWeight
&
41 getRegClassWeight(const TargetRegisterClass
*RC
) const override
;
43 // \returns true if \p Reg can be defined in one ALU clause and used in
45 bool isPhysRegLiveAcrossClauses(unsigned Reg
) const;
47 void eliminateFrameIndex(MachineBasicBlock::iterator MI
, int SPAdj
,
48 unsigned FIOperandNum
,
49 RegScavenger
*RS
= nullptr) const override
;
51 void reserveRegisterTuples(BitVector
&Reserved
, unsigned Reg
) const;
54 } // End namespace llvm