89 OS <<
"\t.functype\t" << Symbol->
getName();
96 for (
auto Ty : Params)
102 OS <<
"\t.import_global\t" << name <<
'\n';
107 OS <<
"\t.import_module\t" << Sym->
getName() <<
", " << ModuleName <<
'\n';
111 OS <<
"\t.indidx \t" << *Value <<
'\n';
120 cast<MCSymbolWasm>(
Symbol)->setParams(std::move(Params));
129 cast<MCSymbolWasm>(
Symbol)->setReturns(std::move(Returns));
138 ++Grouped.
back().second;
142 for (
auto Pair : Grouped) {
166 for (
MVT Ty : Params)
170 for (
MVT Ty : Results)
173 WasmSym->
setParams(std::move(ValParams));
void push_back(const T &Elt)
const char * TypeToString(MVT Ty)
void setModuleName(StringRef Name)
Compute iterated dominance frontiers using a linear time algorithm.
void emitIndirectFunctionType(MCSymbol *Symbol, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results) override
.functype
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This class prints an WebAssembly MCInst to wasm file syntax.
Target specific streamer interface.
void emitImportModule(MCSymbolWasm *Sym, StringRef ModuleName) override
.import_module
Function Alias Analysis Results
void setParams(SmallVectorImpl< wasm::ValType > &&Pars)
void emitGlobalImport(StringRef name) override
.import_global
void emitLocal(ArrayRef< MVT > Types) override
.local
void emitParam(MCSymbol *Symbol, ArrayRef< MVT > Types) override
.param
void emitIndirectFunctionType(MCSymbol *Symbol, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results) override
.functype
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
void emitIndIdx(const MCExpr *Value) override
.indidx
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
virtual void EmitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers...
wasm::ValType toValType(const MVT &Ty)
WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...
void emitValueType(wasm::ValType Type)
Streaming machine code generation interface.
The instances of the Type class are immutable: once they are created, they are never changed...
This file provides WebAssembly-specific target descriptions.
static void PrintTypes(formatted_raw_ostream &OS, ArrayRef< MVT > Types)
void emitIndIdx(const MCExpr *Value) override
.indidx
void setReturns(SmallVectorImpl< wasm::ValType > &&Rets)
void emitImportModule(MCSymbolWasm *Sym, StringRef ModuleName) override
.import_module
WebAssemblyTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void setType(wasm::WasmSymbolType type)
This file declares WebAssembly-specific target streamer classes.
void emitEndFunc() override
.endfunc
LLVM_NODISCARD bool empty() const
WebAssemblyTargetStreamer(MCStreamer &S)
void emitParam(MCSymbol *Symbol, ArrayRef< MVT > Types) override
.param
void emitEndFunc() override
.endfunc
void emitLocal(ArrayRef< MVT > Types) override
.local
void emitGlobalImport(StringRef name) override
.import_global
StringRef getName() const
getName - Get the symbol name.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void emitResult(MCSymbol *Symbol, ArrayRef< MVT > Types) override
.result
LLVM Value Representation.
void emitResult(MCSymbol *Symbol, ArrayRef< MVT > Types) override
.result
StringRef - Represent a constant reference to a string, i.e.
void EmitULEB128IntValue(uint64_t Value)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
bool empty() const
empty - Check if the array is empty.
WebAssemblyTargetWasmStreamer(MCStreamer &S)