10 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H 11 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H 21 class WebAssemblyTargetStreamer;
22 class WebAssemblyMCInstLower;
29 std::vector<std::unique_ptr<wasm::WasmSignature>> Signatures;
33 std::unique_ptr<MCStreamer> Streamer)
34 :
AsmPrinter(TM,
std::move(Streamer)), Subtarget(nullptr), MRI(nullptr),
38 return "WebAssembly Assembly Printer";
43 Signatures.push_back(std::move(Sig));
61 void EmitEndOfAsmFile(
Module &M)
override;
62 void EmitJumpTableInfo()
override;
63 void EmitConstantPool()
override;
64 void EmitFunctionBodyStart()
override;
67 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
68 unsigned AsmVariant,
const char *ExtraCode,
70 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
71 unsigned AsmVariant,
const char *ExtraCode,
74 MVT getRegType(
unsigned RegNo)
const;
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
Base class for the full range of assembler expressions which are needed for parsing.
WebAssemblyAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...
unsigned const MachineRegisterInfo * MRI
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
This is an important base class in LLVM.
const WebAssemblySubtarget & getSubtarget() const
This class is intended to be used as a driving class for all asm writers.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
void addSignature(std::unique_ptr< wasm::WasmSignature > &&Sig)
This file declares the WebAssembly-specific subclass of TargetSubtarget.
MachineOperand class - Representation of each machine instruction operand.
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
This file declares WebAssembly-specific per-machine-function information.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
This class implements an extremely fast bulk output stream that can only output to a stream...
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.