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 LLVM_LIB_TARGET_R600_AMDGPUMCINSTLOWER_H
12 #define LLVM_LIB_TARGET_R600_AMDGPUMCINSTLOWER_H
16 class AMDGPUSubtarget;
21 class AMDGPUMCInstLower {
23 // This must be kept in sync with the SISubtarget class in SIInstrInfo.td
30 const AMDGPUSubtarget &ST;
32 /// Convert a member of the AMDGPUSubtarget::Generation enum to the
34 enum SISubtarget AMDGPUSubtargetToSISubtarget(unsigned Gen) const;
36 /// Get the MC opcode for this MachineInstr.
37 unsigned getMCOpcode(unsigned MIOpcode) const;
40 AMDGPUMCInstLower(MCContext &ctx, const AMDGPUSubtarget &ST);
42 /// \brief Lower a MachineInstr to an MCInst
43 void lower(const MachineInstr *MI, MCInst &OutMI) const;
47 } // End namespace llvm