Go to the documentation of this file.
8 #ifndef LLVM_MC_MCSYMBOLWASM_H
9 #define LLVM_MC_MCSYMBOLWASM_H
19 bool IsHidden =
false;
20 bool IsComdat =
false;
21 bool OmitFromLinkingSection =
false;
22 mutable bool IsUsedInInitArray =
false;
23 mutable bool IsUsedInGOT =
false;
33 const MCExpr *SymbolSize =
nullptr;
74 bool isWeak()
const {
return IsWeak; }
103 if (ImportName.hasValue())
104 return ImportName.getValue();
153 #endif // LLVM_MC_MCSYMBOLWASM_H
@ WASM_SYMBOL_TYPE_SECTION
const unsigned WASM_SYMBOL_EXPORTED
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Optional< wasm::WasmSymbolType > getType() const
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
void setOmitFromLinkingSection()
const unsigned WASM_SYMBOL_NO_STRIP
const wasm::WasmTableType & getTableType() const
@ WASM_SYMBOL_TYPE_GLOBAL
The instances of the Type class are immutable: once they are created, they are never changed.
void setSize(const MCExpr *SS)
void setHidden(bool isHidden)
void setSignature(wasm::WasmSignature *Sig)
bool hasTableType() const
constexpr bool hasValue() const
void setImportName(StringRef Name)
StringRef getExportName() const
const unsigned WASM_SYMBOL_TLS
void setComdat(bool isComdat)
void setType(wasm::WasmSymbolType type)
StringRef getImportName() const
@ WASM_SYMBOL_TYPE_FUNCTION
static bool classof(const MCSymbol *S)
StringRef getName() const
getName - Get the symbol name.
const wasm::WasmGlobalType & getGlobalType() const
void setImportModule(StringRef Name)
StringRef getImportModule() const
MCSymbolWasm(const StringMapEntry< bool > *Name, bool isTemporary)
bool hasImportModule() const
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
void setTableType(wasm::WasmTableType TT)
void modifyFlags(uint32_t Value, uint32_t Mask) const
Modify the flags via a mask.
void setWeak(bool isWeak)
bool isUsedInInitArray() const
uint32_t getFlags() const
Get the (implementation defined) symbol flags.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
constexpr const T & getValue() const &
bool omitFromLinkingSection() const
bool hasExportName() const
StringRef - Represent a constant reference to a string, i.e.
void setUsedInGOT() const
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
const MCExpr * getSize() const
void setUsedInInitArray() const
bool isFunctionTable() const
const wasm::WasmSignature * getSignature() const
bool hasImportName() const
void setExportName(StringRef Name)
void setGlobalType(wasm::WasmGlobalType GT)
void setTableType(wasm::ValType VT)
Base class for the full range of assembler expressions which are needed for parsing.