Revert "include/llvm: Add R600 Intrinsics v6"
[oota-llvm.git] / lib / Target / AMDGPU / R600RegisterInfo.h
1 //===-- R600RegisterInfo.h - R600 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 // Interface definition for R600RegisterInfo
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef R600REGISTERINFO_H_
15 #define R600REGISTERINFO_H_
16
17 #include "AMDGPUTargetMachine.h"
18 #include "AMDILRegisterInfo.h"
19
20 namespace llvm {
21
22 class R600TargetMachine;
23 class TargetInstrInfo;
24
25 struct R600RegisterInfo : public AMDGPURegisterInfo
26 {
27   AMDGPUTargetMachine &TM;
28   const TargetInstrInfo &TII;
29
30   R600RegisterInfo(AMDGPUTargetMachine &tm, const TargetInstrInfo &tii);
31
32   virtual BitVector getReservedRegs(const MachineFunction &MF) const;
33
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;
38
39   /// getHWRegChan - get the HW encoding for a register's channel.
40   unsigned getHWRegChan(unsigned reg) const;
41
42   /// getCFGStructurizerRegClass - get the register class of the specified
43   /// type to use in the CFGStructurizer
44   virtual const TargetRegisterClass * getCFGStructurizerRegClass(MVT VT) const;
45
46 private:
47   /// getHWRegChanGen - Generated function returns a register's channel
48   /// encoding.
49   unsigned getHWRegChanGen(unsigned reg) const;
50 };
51
52 } // End namespace llvm
53
54 #endif // AMDIDSAREGISTERINFO_H_