LLVM
15.0.0git
|
Classes | |
class | ConcreteSortRegion |
class | SortRegion |
class | SortRegionInfo |
Functions | |
unsigned | GetDefaultP2AlignAny (unsigned Opc) |
Return the default p2align value for a load or store with the given opcode. More... | |
unsigned | GetDefaultP2Align (unsigned Opc) |
bool | isArgument (unsigned Opc) |
bool | isCopy (unsigned Opc) |
bool | isTee (unsigned Opc) |
bool | isCallDirect (unsigned Opc) |
bool | isCallIndirect (unsigned Opc) |
bool | isBrTable (const MachineInstr &MI) |
bool | isMarker (unsigned Opc) |
bool | isCatch (unsigned Opc) |
int | getStackOpcode (unsigned short Opcode) |
int | getRegisterOpcode (unsigned short Opcode) |
int | getWasm64Opcode (unsigned short Opcode) |
bool | isDefaultAddressSpace (unsigned AS) |
bool | isWasmVarAddressSpace (unsigned AS) |
bool | isValidAddressSpace (unsigned AS) |
bool | isFuncrefType (const Type *Ty) |
bool | isExternrefType (const Type *Ty) |
bool | isRefType (const Type *Ty) |
bool | isRefType (wasm::ValType Type) |
Optional< wasm::ValType > | parseType (StringRef Type) |
BlockType | parseBlockType (StringRef Type) |
MVT | parseMVT (StringRef Type) |
const char * | anyTypeToString (unsigned Type) |
const char * | typeToString (wasm::ValType Type) |
std::string | typeListToString (ArrayRef< wasm::ValType > List) |
std::string | signatureToString (const wasm::WasmSignature *Sig) |
wasm::ValType | toValType (MVT Type) |
wasm::ValType | regClassToValType (unsigned RC) |
void | wasmSymbolSetType (MCSymbolWasm *Sym, const Type *GlobalVT, const SmallVector< MVT, 1 > &VTs) |
Sets a Wasm Symbol Type. More... | |
bool | isChild (const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI) |
Test whether MI is a child of some other node in an expression tree. More... | |
bool | mayThrow (const MachineInstr &MI) |
const MachineOperand & | getCalleeOp (const MachineInstr &MI) |
Returns the operand number of a callee, assuming the argument is a call instruction. More... | |
MCSymbolWasm * | getOrCreateFunctionTableSymbol (MCContext &Ctx, const WebAssemblySubtarget *Subtarget) |
Returns the __indirect_function_table, for use in call_indirect and in function bitcasts. More... | |
MCSymbolWasm * | getOrCreateFuncrefCallTableSymbol (MCContext &Ctx, const WebAssemblySubtarget *Subtarget) |
Returns the __funcref_call_table, for use in funcref calls when lowered to table.set + call_indirect. More... | |
MachineInstr * | findCatch (MachineBasicBlock *EHPad) |
Find a catch instruction from an EH pad. More... | |
int16_t | getNamedOperandIdx (uint16_t Opcode, uint16_t NamedIndex) |
FastISel * | createFastISel (FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo) |
Variables | |
static const unsigned | Nop = 0x01 |
Instruction opcodes emitted via means other than CodeGen. More... | |
static const unsigned | End = 0x0b |
cl::opt< bool > | WasmEnableEmEH |
cl::opt< bool > | WasmEnableEmSjLj |
cl::opt< bool > | WasmEnableEH |
cl::opt< bool > | WasmEnableSjLj |
const char *const | ClangCallTerminateFn |
const char *const | CxaBeginCatchFn = "__cxa_begin_catch" |
const char *const | CxaRethrowFn = "__cxa_rethrow" |
const char *const | StdTerminateFn = "_ZSt9terminatev" |
const char *const | PersonalityWrapperFn |
|
strong |
Used as immediate MachineOperands for block signatures.
Enumerator | |
---|---|
Invalid | |
Void | |
I32 | |
I64 | |
F32 | |
F64 | |
V128 | |
Externref | |
Funcref | |
Multivalue |
Definition at line 28 of file WebAssemblyTypeUtilities.h.
Enumerator | |
---|---|
fixup_sleb128_i32 | |
fixup_sleb128_i64 | |
fixup_uleb128_i32 | |
fixup_uleb128_i64 | |
LastTargetFixupKind | |
NumTargetFixupKinds |
Definition at line 16 of file WebAssemblyFixupKinds.h.
Definition at line 39 of file WebAssemblyMCTargetDesc.h.
Enumerator | |
---|---|
CPP_EXCEPTION | |
C_LONGJMP |
Definition at line 27 of file WasmEHFuncInfo.h.
Enumerator | |
---|---|
TI_LOCAL | |
TI_GLOBAL_FIXED | |
TI_OPERAND_STACK | |
TI_GLOBAL_RELOC | |
TI_LOCAL_INDIRECT |
Definition at line 87 of file WebAssembly.h.
enum llvm::WebAssembly::WasmAddressSpace : unsigned |
Enumerator | |
---|---|
WASM_ADDRESS_SPACE_DEFAULT | |
WASM_ADDRESS_SPACE_VAR | |
WASM_ADDRESS_SPACE_EXTERNREF | |
WASM_ADDRESS_SPACE_FUNCREF |
Definition at line 46 of file WebAssemblyTypeUtilities.h.
const char * llvm::WebAssembly::anyTypeToString | ( | unsigned | Type | ) |
Definition at line 76 of file WebAssemblyTypeUtilities.cpp.
References llvm::wasm::WASM_TYPE_EXTERNREF, llvm::wasm::WASM_TYPE_F32, llvm::wasm::WASM_TYPE_F64, llvm::wasm::WASM_TYPE_FUNC, llvm::wasm::WASM_TYPE_FUNCREF, llvm::wasm::WASM_TYPE_I32, llvm::wasm::WASM_TYPE_I64, llvm::wasm::WASM_TYPE_NORESULT, and llvm::wasm::WASM_TYPE_V128.
Referenced by llvm::WebAssemblyInstPrinter::printWebAssemblySignatureOperand(), and typeToString().
FastISel * llvm::WebAssembly::createFastISel | ( | FunctionLoweringInfo & | funcInfo, |
const TargetLibraryInfo * | libInfo | ||
) |
Definition at line 1432 of file WebAssemblyFastISel.cpp.
MachineInstr * llvm::WebAssembly::findCatch | ( | MachineBasicBlock * | EHPad | ) |
Find a catch instruction from an EH pad.
Returns null if no catch instruction found or the catch is in an invalid location.
Definition at line 170 of file WebAssemblyUtilities.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), isCatch(), llvm::MachineBasicBlock::isEHPad(), and isMarker().
const MachineOperand & llvm::WebAssembly::getCalleeOp | ( | const MachineInstr & | MI | ) |
Returns the operand number of a callee, assuming the argument is a call instruction.
Definition at line 108 of file WebAssemblyUtilities.cpp.
References llvm::AArch64ISD::CALL, llvm_unreachable, and MI.
Referenced by llvm::WebAssemblyInstrInfo::getCalleeOperand(), mayThrow(), and queryCallee().
|
inline |
Definition at line 266 of file WebAssemblyMCTargetDesc.h.
References Align, GetDefaultP2AlignAny(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstPrinter::printWebAssemblyP2AlignOperand(), and rewriteP2Align().
|
inline |
Return the default p2align value for a load or store with the given opcode.
Definition at line 137 of file WebAssemblyMCTargetDesc.h.
References WASM_LOAD_STORE.
Referenced by GetDefaultP2Align().
Referenced by llvm::WebAssemblyRegisterInfo::eliminateFrameIndex().
MCSymbolWasm * llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol | ( | MCContext & | Ctx, |
const WebAssemblySubtarget * | Subtarget | ||
) |
Returns the __funcref_call_table, for use in funcref calls when lowered to table.set + call_indirect.
Definition at line 144 of file WebAssemblyUtilities.cpp.
References llvm::MCContext::getOrCreateSymbol(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::MCSymbolWasm::isFunctionTable(), llvm::MCContext::lookupSymbol(), llvm::MCContext::reportError(), llvm::MCSymbolWasm::setOmitFromLinkingSection(), llvm::MCSymbolWasm::setTableType(), llvm::MCSymbolWasm::setType(), llvm::MCSymbolWasm::setWeak(), llvm::wasm::WASM_SYMBOL_TYPE_TABLE, and llvm::wasm::WASM_TYPE_FUNCREF.
Referenced by LowerCallResults().
MCSymbolWasm * llvm::WebAssembly::getOrCreateFunctionTableSymbol | ( | MCContext & | Ctx, |
const WebAssemblySubtarget * | Subtarget | ||
) |
Returns the __indirect_function_table, for use in call_indirect and in function bitcasts.
Definition at line 125 of file WebAssemblyUtilities.cpp.
References llvm::MCContext::getOrCreateSymbol(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::MCSymbolWasm::isFunctionTable(), llvm::MCContext::lookupSymbol(), llvm::MCContext::reportError(), llvm::MCSymbolWasm::setFunctionTable(), llvm::MCSymbolWasm::setOmitFromLinkingSection(), and llvm::MCSymbol::setUndefined().
Referenced by llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), and LowerCallResults().
int llvm::WebAssembly::getRegisterOpcode | ( | unsigned short | Opcode | ) |
Referenced by llvm::WebAssemblyAsmTypeCheck::typeCheck().
int llvm::WebAssembly::getStackOpcode | ( | unsigned short | Opcode | ) |
Referenced by removeRegisterOperands().
int llvm::WebAssembly::getWasm64Opcode | ( | unsigned short | Opcode | ) |
|
inline |
Definition at line 274 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyFrameLowering::emitPrologue(), and hasArgumentDef().
|
inline |
Definition at line 374 of file WebAssemblyMCTargetDesc.h.
References MI.
|
inline |
Definition at line 350 of file WebAssemblyMCTargetDesc.h.
References llvm::AArch64ISD::CALL.
|
inline |
Definition at line 362 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().
|
inline |
Definition at line 406 of file WebAssemblyMCTargetDesc.h.
Referenced by findCatch(), and isSafeToMove().
bool llvm::WebAssembly::isChild | ( | const MachineInstr & | MI, |
const WebAssemblyFunctionInfo & | MFI | ||
) |
Test whether MI is a child of some other node in an expression tree.
Definition at line 53 of file WebAssemblyUtilities.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isReg(), llvm::Register::isVirtualRegister(), llvm::WebAssemblyFunctionInfo::isVRegStackified(), and MI.
|
inline |
Definition at line 306 of file WebAssemblyMCTargetDesc.h.
|
inline |
Definition at line 60 of file WebAssemblyTypeUtilities.h.
References WASM_ADDRESS_SPACE_DEFAULT.
Referenced by isValidAddressSpace().
Definition at line 74 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_EXTERNREF.
Referenced by isRefType().
Definition at line 69 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_FUNCREF.
Referenced by isRefType().
|
inline |
Definition at line 386 of file WebAssemblyMCTargetDesc.h.
References llvm::bitc::END_BLOCK, and llvm::AMDGPUISD::LOOP.
Referenced by findCatch().
Definition at line 79 of file WebAssemblyTypeUtilities.h.
References isExternrefType(), and isFuncrefType().
Referenced by IsWebAssemblyTable(), and wasmSymbolSetType().
|
inline |
Definition at line 83 of file WebAssemblyTypeUtilities.h.
References llvm::wasm::EXTERNREF, and llvm::wasm::FUNCREF.
|
inline |
Definition at line 328 of file WebAssemblyMCTargetDesc.h.
Referenced by unstackifyVRegsUsedInSplitBB().
|
inline |
Definition at line 66 of file WebAssemblyTypeUtilities.h.
References isDefaultAddressSpace(), and isWasmVarAddressSpace().
|
inline |
Definition at line 63 of file WebAssemblyTypeUtilities.h.
References WASM_ADDRESS_SPACE_VAR.
Referenced by llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyFrameLowering::getLocalForStackObject(), isValidAddressSpace(), IsWebAssemblyGlobal(), and IsWebAssemblyTable().
bool llvm::WebAssembly::mayThrow | ( | const MachineInstr & | MI | ) |
Definition at line 64 of file WebAssemblyUtilities.cpp.
References assert(), CxaBeginCatchFn, F, getCalleeOp(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getSymbolName(), isCallIndirect(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isSymbol(), MI, PersonalityWrapperFn, and StdTerminateFn.
WebAssembly::BlockType llvm::WebAssembly::parseBlockType | ( | StringRef | Type | ) |
Definition at line 44 of file WebAssemblyTypeUtilities.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), Externref, F32, F64, Funcref, I32, I64, Invalid, V128, and Void.
Definition at line 58 of file WebAssemblyTypeUtilities.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), llvm::MVT::externref, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::funcref, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, llvm::MVT::v16i8, llvm::MVT::v2i64, llvm::MVT::v4i32, and llvm::MVT::v8i16.
Referenced by llvm::WebAssemblyFunctionInfo::initializeBaseYamlFields().
Optional< wasm::ValType > llvm::WebAssembly::parseType | ( | StringRef | Type | ) |
Definition at line 23 of file WebAssemblyTypeUtilities.cpp.
References llvm::wasm::EXTERNREF, llvm::wasm::F32, llvm::wasm::F64, llvm::wasm::FUNCREF, llvm::wasm::I32, llvm::wasm::I64, and llvm::wasm::V128.
wasm::ValType llvm::WebAssembly::regClassToValType | ( | unsigned | RC | ) |
Definition at line 150 of file WebAssemblyTypeUtilities.cpp.
References llvm::wasm::EXTERNREF, llvm::wasm::F32, llvm::wasm::F64, llvm::wasm::FUNCREF, llvm::wasm::I32, llvm::wasm::I64, llvm_unreachable, and llvm::wasm::V128.
Referenced by llvm::WebAssemblyAsmTypeCheck::typeCheck().
std::string llvm::WebAssembly::signatureToString | ( | const wasm::WasmSignature * | Sig | ) |
Definition at line 115 of file WebAssemblyTypeUtilities.cpp.
References llvm::wasm::WasmSignature::Params, llvm::wasm::WasmSignature::Returns, S, and typeListToString().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitFunctionType(), llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction(), llvm::WebAssemblyInstPrinter::printOperand(), and llvm::WebAssemblyInstPrinter::printWebAssemblySignatureOperand().
wasm::ValType llvm::WebAssembly::toValType | ( | MVT | Type | ) |
Definition at line 124 of file WebAssemblyTypeUtilities.cpp.
References llvm::MVT::externref, llvm::wasm::EXTERNREF, llvm::MVT::f32, llvm::wasm::F32, llvm::MVT::f64, llvm::wasm::F64, llvm::MVT::funcref, llvm::wasm::FUNCREF, llvm::MVT::i32, llvm::wasm::I32, llvm::MVT::i64, llvm::wasm::I64, llvm_unreachable, llvm::wasm::V128, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i32, and llvm::MVT::v8i16.
Referenced by llvm::valTypesFromMVTs(), and wasmSymbolSetType().
std::string llvm::WebAssembly::typeListToString | ( | ArrayRef< wasm::ValType > | List | ) |
Definition at line 105 of file WebAssemblyTypeUtilities.cpp.
References List, S, and typeToString().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTagType(), and signatureToString().
const char * llvm::WebAssembly::typeToString | ( | wasm::ValType | Type | ) |
Definition at line 101 of file WebAssemblyTypeUtilities.cpp.
References anyTypeToString().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitGlobalType(), llvm::WebAssemblyTargetAsmStreamer::emitTableType(), printTypes(), and typeListToString().
void llvm::WebAssembly::wasmSymbolSetType | ( | MCSymbolWasm * | Sym, |
const Type * | GlobalVT, | ||
const SmallVector< MVT, 1 > & | VTs | ||
) |
Sets a Wasm Symbol Type.
Definition at line 171 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::MVT::externref, llvm::MVT::funcref, llvm::Type::getArrayElementType(), llvm::Type::getPointerAddressSpace(), llvm::MCSymbolWasm::getType(), llvm::Type::isArrayTy(), isRefType(), llvm::report_fatal_error(), llvm::MCSymbolWasm::setGlobalType(), llvm::MCSymbolWasm::setTableType(), llvm::MCSymbolWasm::setType(), toValType(), WASM_ADDRESS_SPACE_EXTERNREF, WASM_ADDRESS_SPACE_FUNCREF, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, and llvm::wasm::WASM_SYMBOL_TYPE_TABLE.
Referenced by llvm::WebAssemblyAsmPrinter::emitGlobalVariable().
Definition at line 46 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 47 of file WebAssemblyUtilities.cpp.
|
static |
Definition at line 134 of file WebAssemblyMCTargetDesc.h.
|
static |
Instruction opcodes emitted via means other than CodeGen.
Definition at line 133 of file WebAssemblyMCTargetDesc.h.
Referenced by avoidZeroOffsetLandingPad(), llvm::AsmPrinter::emitNops(), llvm::X86InstrInfo::getNop(), llvm::HexagonInstrInfo::getNop(), llvm::PPCInstrInfo::getNop(), and llvm::HexagonMCInstrInfo::padEndloop().
Definition at line 49 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 48 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
cl::opt< bool > llvm::WebAssembly::WasmEnableEH |
Referenced by basicCheckForEHAndSjLj(), and llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo().
cl::opt< bool > llvm::WebAssembly::WasmEnableEmEH |
Referenced by basicCheckForEHAndSjLj(), and llvm::WebAssemblyAsmPrinter::emitDecls().
cl::opt< bool > llvm::WebAssembly::WasmEnableEmSjLj |
Referenced by basicCheckForEHAndSjLj(), and llvm::WebAssemblyAsmPrinter::emitDecls().
cl::opt< bool > llvm::WebAssembly::WasmEnableSjLj |
Referenced by basicCheckForEHAndSjLj(), canLongjmp(), and llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo().