9 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H 10 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H 20 class WebAssemblyTargetStreamer;
21 class WebAssemblyMCInstLower;
28 std::vector<std::unique_ptr<wasm::WasmSignature>> Signatures;
32 std::unique_ptr<MCStreamer> Streamer)
33 :
AsmPrinter(TM,
std::move(Streamer)), Subtarget(nullptr), MRI(nullptr),
37 return "WebAssembly Assembly Printer";
42 Signatures.push_back(std::move(Sig));
60 void EmitEndOfAsmFile(
Module &M)
override;
61 void EmitProducerInfo(
Module &M);
62 void EmitTargetFeatures(
Module &M);
63 void EmitJumpTableInfo()
override;
64 void EmitConstantPool()
override;
65 void EmitFunctionBodyStart()
override;
67 bool PrintAsmOperand(
const MachineInstr *MI,
unsigned OpNo,
69 bool PrintAsmMemoryOperand(
const MachineInstr *MI,
unsigned OpNo,
72 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. ...
WebAssemblyAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
static yaml::StringValue regToString(unsigned Reg, const TargetRegisterInfo &TRI)
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.
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...
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
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.
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.