9#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H
10#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H
19class WebAssemblyTargetStreamer;
26 std::vector<std::unique_ptr<wasm::WasmSignature>>
Signatures;
27 std::vector<std::unique_ptr<std::string>>
Names;
28 bool signaturesEmitted =
false;
31 std::unique_ptr<std::string>
N = std::make_unique<std::string>(
Name);
32 Names.push_back(std::move(
N));
38 std::unique_ptr<MCStreamer> Streamer)
43 return "WebAssembly Assembly Printer";
66 void emitEndOfAsmFile(
Module &M)
override;
67 void EmitProducerInfo(
Module &M);
68 void EmitTargetFeatures(
Module &M);
71 void emitJumpTableInfo()
override;
73 void emitFunctionBodyStart()
override;
80 MVT getRegType(
unsigned RegNo)
const;
85 bool &InvokeDetected);
87 void emitDecls(
const Module &M);
unsigned const MachineRegisterInfo * MRI
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library,...
static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)
const char LLVMTargetMachineRef TM
static yaml::StringValue regToString(Register Reg, const TargetRegisterInfo &TRI)
static const FuncProtoTy Signatures[]
This file declares WebAssembly-specific per-machine-function information.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
This class is intended to be used as a driving class for all asm writers.
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
A Module instance is used to store all the information related to an LLVM module.
StringRef - Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
const WebAssemblySubtarget & getSubtarget() const
WebAssemblyAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
void addSignature(std::unique_ptr< wasm::WasmSignature > &&Sig)
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.