Go to the documentation of this file.
9 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H
10 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYASMPRINTER_H
19 class WebAssemblyTargetStreamer;
26 std::vector<std::unique_ptr<wasm::WasmSignature>> Signatures;
27 std::vector<std::unique_ptr<std::string>> Names;
30 std::unique_ptr<std::string>
N = std::make_unique<std::string>(
Name);
37 std::unique_ptr<MCStreamer> Streamer)
42 return "WebAssembly Assembly Printer";
65 void emitEndOfAsmFile(
Module &M)
override;
66 void EmitProducerInfo(
Module &M);
67 void EmitTargetFeatures(
Module &M);
68 void emitJumpTableInfo()
override;
70 void emitFunctionBodyStart()
override;
77 MVT getRegType(
unsigned RegNo)
const;
82 bool &InvokeDetected);
static yaml::StringValue regToString(Register 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...
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
const WebAssemblySubtarget & getSubtarget() const
static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
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...
void addSignature(std::unique_ptr< wasm::WasmSignature > &&Sig)
MachineOperand class - Representation of each machine instruction operand.
This class implements an extremely fast bulk output stream that can only output to a stream.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Representation of each machine instruction.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Primary interface to the complete machine description for the target machine.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
A Module instance is used to store all the information related to an LLVM module.
bool runOnMachineFunction(MachineFunction &MF) override
Emit the specified function out to the OutStreamer.
StringRef - Represent a constant reference to a string, i.e.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library,...
unsigned const MachineRegisterInfo * MRI
This class is intended to be used as a driving class for all asm writers.
WebAssemblyAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)