LLVM
24.0.0git
lib
Target
WebAssembly
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
18
#include "
llvm/BinaryFormat/Wasm.h
"
19
#include "
llvm/MC/MCInst.h
"
20
#include "
llvm/Support/Compiler.h
"
21
22
namespace
llvm
{
23
class
WebAssemblyAsmPrinter
;
24
class
DebugLoc
;
25
class
GlobalValue
;
26
class
MCContext
;
27
class
MCSymbol
;
28
class
MachineInstr
;
29
class
MachineOperand
;
30
31
/// This class is used to lower an MachineInstr into an MCInst.
32
class
LLVM_LIBRARY_VISIBILITY
WebAssemblyMCInstLower
{
33
MCContext
&Ctx;
34
WebAssemblyAsmPrinter
&Printer;
35
36
MCSymbol
*GetGlobalAddressSymbol(
const
GlobalValue
&
Global
,
37
const
DebugLoc
&
DL
)
const
;
38
MCSymbol
*GetExternalSymbolSymbol(
const
MachineOperand
&MO)
const
;
39
MCOperand
lowerSymbolOperand
(
const
MachineOperand
&MO,
MCSymbol
*Sym)
const
;
40
MCOperand
lowerTypeIndexOperand(
SmallVectorImpl<wasm::ValType>
&&,
41
SmallVectorImpl<wasm::ValType>
&&)
const
;
42
MCOperand
lowerEncodedFunctionSignature(
const
APInt
&Sig)
const
;
43
44
public
:
45
WebAssemblyMCInstLower
(
MCContext
&ctx,
WebAssemblyAsmPrinter
&
printer
)
46
: Ctx(ctx), Printer(
printer
) {}
47
void
lower(
const
MachineInstr
*
MI
,
MCInst
&OutMI)
const
;
48
};
49
}
// end namespace llvm
50
51
#endif
printer
amdgpu next use printer
Definition
AMDGPUNextUseAnalysis.cpp:2584
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition
ARMSLSHardening.cpp:73
Wasm.h
Compiler.h
LLVM_LIBRARY_VISIBILITY
#define LLVM_LIBRARY_VISIBILITY
Definition
Compiler.h:137
MI
IRTranslator LLVM IR MI
Definition
IRTranslator.cpp:866
lowerSymbolOperand
static MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, const AsmPrinter &AP)
Definition
LoongArchMCInstLower.cpp:26
MCInst.h
llvm::APInt
Class for arbitrary precision integers.
Definition
APInt.h:78
llvm::DebugLoc
A debug info location.
Definition
DebugLoc.h:126
llvm::GlobalValue
Definition
GlobalValue.h:49
llvm::MCContext
Context object for machine code objects.
Definition
MCContext.h:83
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition
MCInst.h:188
llvm::MCOperand
Instances of this class represent operands of the MCInst class.
Definition
MCInst.h:40
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition
MCSymbol.h:42
llvm::MachineInstr
Representation of each machine instruction.
Definition
MachineInstr.h:74
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition
MachineOperand.h:49
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition
SmallVector.h:592
llvm::WebAssemblyAsmPrinter
Definition
WebAssemblyAsmPrinter.h:24
llvm::WebAssemblyMCInstLower::WebAssemblyMCInstLower
WebAssemblyMCInstLower(MCContext &ctx, WebAssemblyAsmPrinter &printer)
Definition
WebAssemblyMCInstLower.h:45
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
FunctionInfo.h:25
llvm::AsanDtorKind::Global
@ Global
Append to llvm.global_dtors.
Definition
AddressSanitizerOptions.h:18
Generated on
for LLVM by
1.14.0