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 //===----------------------------------------------------------------------===//
10 // Interface definition for R600RegisterInfo
12 //===----------------------------------------------------------------------===//
14 #ifndef R600REGISTERINFO_H_
15 #define R600REGISTERINFO_H_
17 #include "AMDGPUTargetMachine.h"
18 #include "AMDILRegisterInfo.h"
22 class R600TargetMachine;
23 class TargetInstrInfo;
25 struct R600RegisterInfo : public AMDGPURegisterInfo
27 AMDGPUTargetMachine &TM;
28 const TargetInstrInfo &TII;
30 R600RegisterInfo(AMDGPUTargetMachine &tm, const TargetInstrInfo &tii);
32 virtual BitVector getReservedRegs(const MachineFunction &MF) const;
34 /// getISARegClass - rc is an AMDIL reg class. This function returns the
35 /// R600 reg class that is equivalent to the given AMDIL reg class.
36 virtual const TargetRegisterClass * getISARegClass(
37 const TargetRegisterClass * rc) const;
39 /// getHWRegChan - get the HW encoding for a register's channel.
40 unsigned getHWRegChan(unsigned reg) const;
42 /// getCFGStructurizerRegClass - get the register class of the specified
43 /// type to use in the CFGStructurizer
44 virtual const TargetRegisterClass * getCFGStructurizerRegClass(MVT VT) const;
47 /// getHWRegChanGen - Generated function returns a register's channel
49 unsigned getHWRegChanGen(unsigned reg) const;
52 } // End namespace llvm
54 #endif // AMDIDSAREGISTERINFO_H_