1 //===- AMDGPUMCInstLower.h MachineInstr Lowering 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.
9 //===----------------------------------------------------------------------===//
11 #ifndef AMDGPU_MCINSTLOWER_H
12 #define AMDGPU_MCINSTLOWER_H
16 class AMDGPUSubtarget;
21 class AMDGPUMCInstLower {
23 // This must be kept in sync with the SISubtarget class in SIInstrInfo.td
29 const AMDGPUSubtarget &ST;
31 /// Convert a member of the AMDGPUSubtarget::Generation enum to the
33 enum SISubtarget AMDGPUSubtargetToSISubtarget(unsigned Gen) const;
35 /// Get the MC opcode for this MachineInstr.
36 unsigned getMCOpcode(unsigned MIOpcode) const;
39 AMDGPUMCInstLower(MCContext &ctx, const AMDGPUSubtarget &ST);
41 /// \brief Lower a MachineInstr to an MCInst
42 void lower(const MachineInstr *MI, MCInst &OutMI) const;
46 } // End namespace llvm
48 #endif //AMDGPU_MCINSTLOWER_H