SIRegisterInfo.h revision 256281
1//===-- SIRegisterInfo.h - SI Register Info Interface ----------*- C++ -*--===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10/// \file 11/// \brief Interface definition for SIRegisterInfo 12// 13//===----------------------------------------------------------------------===// 14 15 16#ifndef SIREGISTERINFO_H_ 17#define SIREGISTERINFO_H_ 18 19#include "AMDGPURegisterInfo.h" 20 21namespace llvm { 22 23class AMDGPUTargetMachine; 24class TargetInstrInfo; 25 26struct SIRegisterInfo : public AMDGPURegisterInfo { 27 AMDGPUTargetMachine &TM; 28 const TargetInstrInfo &TII; 29 30 SIRegisterInfo(AMDGPUTargetMachine &tm, const TargetInstrInfo &tii); 31 32 virtual BitVector getReservedRegs(const MachineFunction &MF) const; 33 34 virtual unsigned getRegPressureLimit(const TargetRegisterClass *RC, 35 MachineFunction &MF) const; 36 37 /// \param RC is an AMDIL reg class. 38 /// 39 /// \returns the SI register class that is equivalent to \p RC. 40 virtual const TargetRegisterClass * 41 getISARegClass(const TargetRegisterClass *RC) const; 42 43 /// \brief get the register class of the specified type to use in the 44 /// CFGStructurizer 45 virtual const TargetRegisterClass * getCFGStructurizerRegClass(MVT VT) const; 46}; 47 48} // End namespace llvm 49 50#endif // SIREGISTERINFO_H_ 51