1 //===- AMDGPUMCInstLower.h MachineInstr Lowering Interface ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMCINSTLOWER_H
11 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUMCINSTLOWER_H
12 
13 namespace llvm {
14 
15 class AMDGPUSubtarget;
16 class AsmPrinter;
17 class MachineBasicBlock;
18 class MachineInstr;
19 class MachineOperand;
20 class MCContext;
21 class MCExpr;
22 class MCInst;
23 class MCOperand;
24 
25 class AMDGPUMCInstLower {
26   MCContext &Ctx;
27   const AMDGPUSubtarget &ST;
28   const AsmPrinter ≈
29 
30   const MCExpr *getLongBranchBlockExpr(const MachineBasicBlock &SrcBB,
31                                        const MachineOperand &MO) const;
32 
33 public:
34   AMDGPUMCInstLower(MCContext &ctx, const AMDGPUSubtarget &ST,
35                     const AsmPrinter &AP);
36 
37   bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const;
38 
39   /// \brief Lower a MachineInstr to an MCInst
40   void lower(const MachineInstr *MI, MCInst &OutMI) const;
41 
42 };
43 
44 } // End namespace llvm
45 
46 #endif
47