1 //===-- SIInstrInfo.h - TODO: Add brief description -------===//
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 // TODO: Add full description
12 //===----------------------------------------------------------------------===//
18 #include "AMDGPUInstrInfo.h"
19 #include "SIRegisterInfo.h"
23 class SIInstrInfo : public AMDGPUInstrInfo {
25 const SIRegisterInfo RI;
26 AMDGPUTargetMachine &TM;
28 MachineInstr * convertABS_f32(MachineInstr & absInstr, MachineFunction &MF,
31 MachineInstr * convertCLAMP_f32(MachineInstr & clampInstr,
32 MachineFunction &MF, DebugLoc DL) const;
35 explicit SIInstrInfo(AMDGPUTargetMachine &tm);
37 const SIRegisterInfo &getRegisterInfo() const;
39 virtual void copyPhysReg(MachineBasicBlock &MBB,
40 MachineBasicBlock::iterator MI, DebugLoc DL,
41 unsigned DestReg, unsigned SrcReg,
44 unsigned getEncodingType(const MachineInstr &MI) const;
46 unsigned getEncodingBytes(const MachineInstr &MI) const;
48 uint64_t getBinaryCode(const MachineInstr &MI, bool encodOpcode = false) const;
50 virtual MachineInstr * convertToISA(MachineInstr & MI, MachineFunction &MF,
53 virtual unsigned getISAOpcode(unsigned AMDILopcode) const;
57 } // End namespace llvm
59 /* These must be kept in sync with SIInstructions.td and also the
60 * InstrEncodingInfo array in SIInstrInfo.cpp.
62 * NOTE: This enum is only used to identify the encoding type within LLVM,
63 * the actual encoding type that is part of the instruction format is different
65 namespace SIInstrEncodingType {
86 #define SI_INSTR_FLAGS_ENCODING_MASK 0xf
88 namespace SIInstrFlags {
90 /* First 4 bits are the instruction encoding */
95 #endif //SIINSTRINFO_H