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 /// \brief Interface definition for R600RegisterInfo
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
16 #define LLVM_LIB_TARGET_AMDGPU_R600REGISTERINFO_H
18 #include "AMDGPURegisterInfo.h"
22 class AMDGPUSubtarget;
24 struct R600RegisterInfo final : public AMDGPURegisterInfo {
29 BitVector getReservedRegs(const MachineFunction &MF) const override;
30 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
31 unsigned getFrameRegister(const MachineFunction &MF) const override;
33 /// \brief get the HW encoding for a register's channel.
34 unsigned getHWRegChan(unsigned reg) const;
36 unsigned getHWRegIndex(unsigned Reg) const;
38 /// \brief get the register class of the specified type to use in the
40 const TargetRegisterClass *getCFGStructurizerRegClass(MVT VT) const;
42 const RegClassWeight &
43 getRegClassWeight(const TargetRegisterClass *RC) const override;
45 // \returns true if \p Reg can be defined in one ALU clause and used in
47 bool isPhysRegLiveAcrossClauses(unsigned Reg) const;
49 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
50 unsigned FIOperandNum,
51 RegScavenger *RS = nullptr) const override;
54 } // End namespace llvm