LLVM 17.0.0git
|
Classes | |
class | ConcreteSortRegion |
class | SortRegion |
class | SortRegionInfo |
Variables | |
static const unsigned | Nop = 0x01 |
Instruction opcodes emitted via means other than CodeGen. | |
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 30 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 88 of file WebAssembly.h.
Enumerator | |
---|---|
WASM_ADDRESS_SPACE_DEFAULT | |
WASM_ADDRESS_SPACE_VAR | |
WASM_ADDRESS_SPACE_EXTERNREF | |
WASM_ADDRESS_SPACE_FUNCREF |
Definition at line 48 of file WebAssemblyTypeUtilities.h.
Definition at line 77 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_unreachable, and MI.
Referenced by llvm::WebAssemblyInstrInfo::getCalleeOperand(), mayThrow(), and queryCallee().
unsigned llvm::WebAssembly::getCopyOpcodeForRegClass | ( | const TargetRegisterClass * | RC | ) |
Returns the appropriate copy opcode for the given register class.
Definition at line 183 of file WebAssemblyUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstrInfo::copyPhysReg(), maybeRewriteToFallthrough(), and unstackifyVRegsUsedInSplitBB().
Definition at line 267 of file WebAssemblyMCTargetDesc.h.
References GetDefaultP2AlignAny(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstPrinter::printWebAssemblyP2AlignOperand(), and rewriteP2Align().
Return the default p2align value for a load or store with the given opcode.
Definition at line 138 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(), Name, 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(), Name, 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 | ) |
Definition at line 275 of file WebAssemblyMCTargetDesc.h.
Referenced by addImplicitDefs(), llvm::WebAssemblyFrameLowering::emitPrologue(), and hasArgumentDef().
|
inline |
Definition at line 375 of file WebAssemblyMCTargetDesc.h.
References MI.
Definition at line 351 of file WebAssemblyMCTargetDesc.h.
Definition at line 363 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().
Definition at line 407 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::WebAssemblyFunctionInfo::isVRegStackified(), and MI.
Definition at line 307 of file WebAssemblyMCTargetDesc.h.
Definition at line 62 of file WebAssemblyTypeUtilities.h.
References WASM_ADDRESS_SPACE_DEFAULT.
Referenced by isValidAddressSpace().
Definition at line 76 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_EXTERNREF.
Referenced by isRefType(), and wasmSymbolSetType().
Definition at line 71 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_FUNCREF.
Referenced by isRefType(), and wasmSymbolSetType().
Definition at line 419 of file WebAssemblyMCTargetDesc.h.
Definition at line 441 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 463 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 387 of file WebAssemblyMCTargetDesc.h.
Referenced by findCatch().
Definition at line 81 of file WebAssemblyTypeUtilities.h.
References isExternrefType(), and isFuncrefType().
Referenced by wasmSymbolSetType().
|
inline |
Definition at line 85 of file WebAssemblyTypeUtilities.h.
References llvm::wasm::EXTERNREF, and llvm::wasm::FUNCREF.
Definition at line 329 of file WebAssemblyMCTargetDesc.h.
Referenced by unstackifyVRegsUsedInSplitBB().
Definition at line 68 of file WebAssemblyTypeUtilities.h.
References isDefaultAddressSpace(), and isWasmVarAddressSpace().
Definition at line 65 of file WebAssemblyTypeUtilities.h.
References WASM_ADDRESS_SPACE_VAR.
Referenced by llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyFrameLowering::getLocalForStackObject(), isValidAddressSpace(), and IsWebAssemblyGlobal().
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, Name, PersonalityWrapperFn, and StdTerminateFn.
WebAssembly::BlockType llvm::WebAssembly::parseBlockType | ( | StringRef | Type | ) |
Definition at line 45 of file WebAssemblyTypeUtilities.cpp.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Default().
Definition at line 59 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().
std::optional< wasm::ValType > llvm::WebAssembly::parseType | ( | StringRef | Type | ) |
Definition at line 24 of file WebAssemblyTypeUtilities.cpp.
wasm::ValType llvm::WebAssembly::regClassToValType | ( | const TargetRegisterClass * | RC | ) |
Definition at line 172 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and regClassToValType().
wasm::ValType llvm::WebAssembly::regClassToValType | ( | unsigned | RC | ) |
Definition at line 151 of file WebAssemblyTypeUtilities.cpp.
References llvm_unreachable.
Referenced by llvm::WebAssemblyMCInstLower::lower(), regClassToValType(), and llvm::WebAssemblyAsmTypeCheck::typeCheck().
std::string llvm::WebAssembly::signatureToString | ( | const wasm::WasmSignature * | Sig | ) |
Definition at line 116 of file WebAssemblyTypeUtilities.cpp.
References llvm::wasm::WasmSignature::Params, llvm::wasm::WasmSignature::Returns, 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 125 of file WebAssemblyTypeUtilities.cpp.
References llvm::MVT::externref, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::funcref, llvm::MVT::i32, llvm::MVT::i64, llvm_unreachable, 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 106 of file WebAssemblyTypeUtilities.cpp.
References List, and typeToString().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTagType(), and signatureToString().
const char * llvm::WebAssembly::typeToString | ( | wasm::ValType | Type | ) |
Definition at line 102 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 177 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::Type::getArrayElementType(), llvm::MCSymbolWasm::getType(), llvm::Type::isArrayTy(), isExternrefType(), isFuncrefType(), isRefType(), llvm::report_fatal_error(), llvm::MCSymbolWasm::setGlobalType(), llvm::MCSymbolWasm::setTableType(), llvm::MCSymbolWasm::setType(), llvm::SmallVectorBase< Size_T >::size(), toValType(), 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.
Definition at line 135 of file WebAssemblyMCTargetDesc.h.
Instruction opcodes emitted via means other than CodeGen.
Definition at line 134 of file WebAssemblyMCTargetDesc.h.
Definition at line 49 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 48 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Referenced by llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo().
Referenced by llvm::WebAssemblyAsmPrinter::emitDecls().
Referenced by llvm::WebAssemblyAsmPrinter::emitDecls().
Referenced by canLongjmp(), and llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo().