1 //===-- AMDGPUInstrInfo.h - AMDGPU Instruction Information ------*- 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 // This file contains the definition of a TargetInstrInfo class that is common
13 //===----------------------------------------------------------------------===//
15 #ifndef AMDGPUINSTRUCTIONINFO_H_
16 #define AMDGPUINSTRUCTIONINFO_H_
18 #include "AMDGPURegisterInfo.h"
19 #include "AMDILInstrInfo.h"
25 class AMDGPUTargetMachine
;
26 class MachineFunction
;
28 class MachineInstrBuilder
;
30 class AMDGPUInstrInfo
: public AMDILInstrInfo
{
32 AMDGPUTargetMachine
& TM
;
33 std::map
<unsigned, unsigned> amdilToISA
;
36 explicit AMDGPUInstrInfo(AMDGPUTargetMachine
&tm
);
38 virtual const AMDGPURegisterInfo
&getRegisterInfo() const = 0;
40 /// getISAOpcode - This function takes an AMDIL opcode as an argument and
41 /// returns an equivalent ISA opcode.
42 virtual unsigned getISAOpcode(unsigned AMDILopcode
) const;
44 /// convertToISA - Convert the AMDIL MachineInstr to a supported ISA
46 virtual MachineInstr
* convertToISA(MachineInstr
& MI
, MachineFunction
&MF
,
49 #include "AMDGPUInstrEnums.h.include"
52 } // End llvm namespace
54 #endif // AMDGPUINSTRINFO_H_