LLVM 19.0.0git
WebAssemblyMCInstLower.h
Go to the documentation of this file.
1//===-- WebAssemblyMCInstLower.h - Lower MachineInstr to MCInst -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file declares the class to lower WebAssembly MachineInstrs to
11/// their corresponding MCInst records.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
16#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMCINSTLOWER_H
17
19#include "llvm/MC/MCInst.h"
21
22namespace llvm {
23class WebAssemblyAsmPrinter;
24class MCContext;
25class MCSymbol;
26class MachineInstr;
27class MachineOperand;
28
29/// This class is used to lower an MachineInstr into an MCInst.
31 MCContext &Ctx;
33
34 MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
35 MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
37 MCOperand lowerTypeIndexOperand(SmallVectorImpl<wasm::ValType> &&,
39
40public:
42 : Ctx(ctx), Printer(printer) {}
43 void lower(const MachineInstr *MI, MCInst &OutMI) const;
44};
45} // end namespace llvm
46
47#endif
#define LLVM_LIBRARY_VISIBILITY
Definition: Compiler.h:131
dxil pretty printer
dxil pretty DXIL Metadata Pretty Printer
Symbol * Sym
Definition: ELF_riscv.cpp:479
IRTranslator LLVM IR MI
static MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, const AsmPrinter &AP)
Context object for machine code objects.
Definition: MCContext.h:76
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:36
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:40
Representation of each machine instruction.
Definition: MachineInstr.h:69
MachineOperand class - Representation of each machine instruction operand.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:586
This class is used to lower an MachineInstr into an MCInst.
WebAssemblyMCInstLower(MCContext &ctx, WebAssemblyAsmPrinter &printer)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18