Go to the documentation of this file.
14 #ifndef LLVM_BINARYFORMAT_WASM_H
15 #define LLVM_BINARYFORMAT_WASM_H
61 std::vector<std::pair<std::string, std::string>>
Languages;
62 std::vector<std::pair<std::string, std::string>>
Tools;
63 std::vector<std::pair<std::string, std::string>>
SDKs;
415 #define WASM_RELOC(name, value) name = value,
418 #include "WasmRelocs.def"
448 return LHS.State ==
RHS.State &&
LHS.Returns ==
RHS.Returns &&
457 return LHS.Type ==
RHS.Type &&
LHS.Mutable ==
RHS.Mutable;
465 return LHS.Flags ==
RHS.Flags &&
LHS.Minimum ==
RHS.Minimum &&
471 return LHS.ElemType ==
RHS.ElemType &&
LHS.Limits ==
RHS.Limits;
@ WASM_SYMBOL_TYPE_SECTION
const unsigned WASM_SYMBOL_EXPORTED
@ WASM_FEATURE_PREFIX_DISALLOWED
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
ArrayRef< uint8_t > Content
This is an optimization pass for GlobalISel generic memory operations.
@ WASM_DATA_SEGMENT_IS_PASSIVE
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_KIND
@ WASM_DYLINK_IMPORT_INFO
const uint32_t WasmVersion
@ WASM_OPCODE_ATOMICS_PREFIX
std::vector< WasmSymbolInfo > SymbolTable
const unsigned WASM_SYMBOL_NO_STRIP
@ WASM_OPCODE_I32_RMW_CMPXCHG
const unsigned WASM_SYMBOL_BINDING_LOCAL
llvm::StringRef relocTypetoString(uint32_t type)
@ WASM_SYMBOL_TYPE_GLOBAL
std::vector< WasmDylinkImportInfo > ImportInfo
@ WASM_ELEM_SEGMENT_IS_PASSIVE
const unsigned WASM_SYMBOL_UNDEFINED
@ WASM_FEATURE_PREFIX_REQUIRED
std::vector< WasmLocalDecl > Locals
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
llvm::StringRef toString(WasmSymbolType type)
const unsigned WASM_SYMBOL_BINDING_WEAK
Optional< StringRef > ExportName
enum llvm::wasm::WasmSignature::@177 State
const unsigned WASM_SYMBOL_VISIBILITY_MASK
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
const unsigned WASM_SYMBOL_TLS
uint32_t CodeSectionOffset
std::vector< std::pair< std::string, std::string > > Languages
@ WASM_SYMBOL_TYPE_FUNCTION
const uint32_t WasmMetadataVersion
Optional< StringRef > ImportModule
union llvm::wasm::WasmInitExprMVP::@172 Value
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
std::vector< StringRef > Comdats
@ WASM_TAG_ATTRIBUTE_EXCEPTION
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
AMD64 Optimization Manual has some nice information about optimizing integer multiplication by a constant How much of it applies to Intel s X86 implementation There are definite trade offs to xmm0 cvttss2siq rdx jb L3 subss xmm0 rax cvttss2siq rdx xorq rdx rax ret instead of xmm1 cvttss2siq rcx movaps xmm2 subss xmm2 cvttss2siq rax rdx xorq rax ucomiss xmm0 cmovb rax ret Seems like the jb branch has high likelihood of being taken It would have saved a few instructions It s not possible to reference and DH registers in an instruction requiring REX prefix divb and mulb both produce results in AH If isel emits a CopyFromReg which gets turned into a movb and that can be allocated a r8b r15b To get around isel emits a CopyFromReg from AX and then right shift it down by and truncate it It s not pretty but it works We need some register allocation magic to make the hack go which would often require a callee saved register Callees usually need to keep this value live for most of their body so it doesn t add a significant burden on them We currently implement this in however this is suboptimal because it means that it would be quite awkward to implement the optimization for callers A better implementation would be to relax the LLVM IR rules for sret arguments to allow a function with an sret argument to have a non void return type
@ WASM_FEATURE_PREFIX_USED
std::vector< uint32_t > Functions
const unsigned WASM_SYMBOL_EXPLICIT_NAME
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
std::vector< std::pair< std::string, std::string > > Tools
SmallVector< ValType, 1 > Returns
@ WASM_OPCODE_I32_ATOMIC_STORE
@ WASM_NAMES_DATA_SEGMENT
bool relocTypeHasAddend(uint32_t type)
@ WASM_OPCODE_MEMORY_INIT
@ WASM_OPCODE_MISC_PREFIX
@ WASM_OPCODE_I32_ATOMIC_WAIT
std::vector< WasmDylinkExportInfo > ExportInfo
StringRef - Represent a constant reference to a string, i.e.
const unsigned WASM_SYMBOL_BINDING_MASK
std::vector< StringRef > Needed
@ WASM_LIMITS_FLAG_HAS_MAX
WasmDataReference DataRef
bool operator==(const WasmSignature &LHS, const WasmSignature &RHS)
std::vector< std::pair< std::string, std::string > > SDKs
@ WASM_OPCODE_ATOMIC_NOTIFY
@ WASM_DYLINK_EXPORT_INFO
std::vector< WasmInitFunc > InitFunctions
const unsigned WASM_SYMBOL_BINDING_GLOBAL
Optional< StringRef > ImportName
Optional< StringRef > ExportName
llvm::StringRef sectionTypeToString(uint32_t type)
@ WASM_OPCODE_MEMORY_FILL
@ WASM_LIMITS_FLAG_IS_SHARED
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
SmallVector< ValType, 4 > Params
const uint32_t WasmPageSize