1 //===-- SIInstrInfo.h - SI Instruction Info Interface ---------------------===//
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 SIInstrInfo.
12 //===----------------------------------------------------------------------===//
18 #include "AMDGPUInstrInfo.h"
19 #include "SIRegisterInfo.h"
23 class SIInstrInfo
: public AMDGPUInstrInfo
{
25 const SIRegisterInfo RI
;
26 AMDGPUTargetMachine
&TM
;
29 explicit SIInstrInfo(AMDGPUTargetMachine
&tm
);
31 const SIRegisterInfo
&getRegisterInfo() const;
33 virtual void copyPhysReg(MachineBasicBlock
&MBB
,
34 MachineBasicBlock::iterator MI
, DebugLoc DL
,
35 unsigned DestReg
, unsigned SrcReg
,
38 /// getEncodingType - Returns the encoding type of this instruction.
39 unsigned getEncodingType(const MachineInstr
&MI
) const;
41 /// getEncodingBytes - Returns the size of this instructions encoding in
43 unsigned getEncodingBytes(const MachineInstr
&MI
) const;
45 virtual MachineInstr
* getMovImmInstr(MachineFunction
*MF
, unsigned DstReg
,
48 virtual unsigned getIEQOpcode() const { assert(!"Implement"); return 0;}
49 virtual bool isMov(unsigned Opcode
) const;
53 } // End namespace llvm
55 // These must be kept in sync with SIInstructions.td and also the
56 // InstrEncodingInfo array in SIInstrInfo.cpp.
58 // NOTE: This enum is only used to identify the encoding type within LLVM,
59 // the actual encoding type that is part of the instruction format is different
60 namespace SIInstrEncodingType
{
81 #define SI_INSTR_FLAGS_ENCODING_MASK 0xf
83 namespace SIInstrFlags
{
85 // First 4 bits are the instruction encoding
90 #endif //SIINSTRINFO_H