LLVM 18.0.0git
|
Classes | |
class | ConcreteSortRegion |
class | SortRegion |
class | SortRegionInfo |
Variables | |
cl::opt< bool > | WasmEnableEmEH |
cl::opt< bool > | WasmEnableEmSjLj |
cl::opt< bool > | WasmEnableEH |
cl::opt< bool > | WasmEnableSjLj |
static const unsigned | Nop = 0x01 |
Instruction opcodes emitted via means other than CodeGen. | |
static const unsigned | End = 0x0b |
static const unsigned | UnusedReg = -1u |
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 25 of file WebAssemblyMCTypeUtilities.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 48 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 20 of file WasmAddressSpaces.h.
Definition at line 57 of file WebAssemblyMCTypeUtilities.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 148 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 86 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 161 of file WebAssemblyUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstrInfo::copyPhysReg(), maybeRewriteToFallthrough(), and unstackifyVRegsUsedInSplitBB().
Definition at line 276 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 147 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 122 of file WebAssemblyUtilities.cpp.
References llvm::MCContext::getOrCreateSymbol(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::MCContext::lookupSymbol(), Name, llvm::MCContext::reportError(), Sym, 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 103 of file WebAssemblyUtilities.cpp.
References llvm::MCContext::getOrCreateSymbol(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::MCContext::lookupSymbol(), Name, llvm::MCContext::reportError(), and Sym.
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().
Definition at line 541 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstPrinter::printOperand().
int llvm::WebAssembly::getWasm64Opcode | ( | unsigned short | Opcode | ) |
Definition at line 328 of file WebAssemblyMCTargetDesc.h.
Referenced by addImplicitDefs(), llvm::WebAssemblyFrameLowering::emitPrologue(), and hasArgumentDef().
Definition at line 428 of file WebAssemblyMCTargetDesc.h.
Definition at line 404 of file WebAssemblyMCTargetDesc.h.
Definition at line 416 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().
Definition at line 460 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 31 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 284 of file WebAssemblyMCTargetDesc.h.
Definition at line 360 of file WebAssemblyMCTargetDesc.h.
Definition at line 34 of file WasmAddressSpaces.h.
References WASM_ADDRESS_SPACE_DEFAULT.
Referenced by isValidAddressSpace().
Definition at line 472 of file WebAssemblyMCTargetDesc.h.
Definition at line 494 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 516 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 440 of file WebAssemblyMCTargetDesc.h.
Referenced by findCatch().
|
inline |
Definition at line 43 of file WebAssemblyMCTypeUtilities.h.
References llvm::wasm::EXTERNREF, and llvm::wasm::FUNCREF.
Definition at line 312 of file WebAssemblyMCTargetDesc.h.
Referenced by isSameScalarConst().
Definition at line 382 of file WebAssemblyMCTargetDesc.h.
Referenced by unstackifyVRegsUsedInSplitBB().
Definition at line 40 of file WasmAddressSpaces.h.
References isDefaultAddressSpace(), and isWasmVarAddressSpace().
Definition at line 37 of file WasmAddressSpaces.h.
References WASM_ADDRESS_SPACE_VAR.
Referenced by llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyFrameLowering::getLocalForStackObject(), isValidAddressSpace(), and IsWebAssemblyGlobal().
Return true if this is a WebAssembly Externref Type.
Definition at line 30 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_EXTERNREF.
Referenced by isWebAssemblyReferenceType(), and wasmSymbolSetType().
Return true if this is a WebAssembly Funcref Type.
Definition at line 36 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_FUNCREF.
Referenced by isWebAssemblyReferenceType(), and wasmSymbolSetType().
Return true if this is a WebAssembly Reference Type.
Definition at line 42 of file WebAssemblyTypeUtilities.h.
References isWebAssemblyExternrefType(), and isWebAssemblyFuncrefType().
Referenced by wasmSymbolSetType().
bool llvm::WebAssembly::mayThrow | ( | const MachineInstr & | MI | ) |
Definition at line 42 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 41 of file WebAssemblyMCTypeUtilities.cpp.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Default().
Definition at line 23 of file WebAssemblyTypeUtilities.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), and llvm::MVT::INVALID_SIMPLE_VALUE_TYPE.
Referenced by llvm::WebAssemblyFunctionInfo::initializeBaseYamlFields().
std::optional< wasm::ValType > llvm::WebAssembly::parseType | ( | StringRef | Type | ) |
Definition at line 20 of file WebAssemblyMCTypeUtilities.cpp.
wasm::ValType llvm::WebAssembly::regClassToValType | ( | unsigned | RC | ) |
Definition at line 105 of file WebAssemblyMCTypeUtilities.cpp.
References llvm_unreachable.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and llvm::WebAssemblyAsmTypeCheck::typeCheck().
std::string llvm::WebAssembly::signatureToString | ( | const wasm::WasmSignature * | Sig | ) |
Definition at line 96 of file WebAssemblyMCTypeUtilities.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 39 of file WebAssemblyTypeUtilities.cpp.
References llvm_unreachable.
Referenced by llvm::valTypesFromMVTs(), and wasmSymbolSetType().
std::string llvm::WebAssembly::typeListToString | ( | ArrayRef< wasm::ValType > | List | ) |
Definition at line 86 of file WebAssemblyMCTypeUtilities.cpp.
References List, and typeToString().
Referenced by llvm::WebAssemblyTargetAsmStreamer::emitTagType(), and signatureToString().
const char * llvm::WebAssembly::typeToString | ( | wasm::ValType | Type | ) |
Definition at line 82 of file WebAssemblyMCTypeUtilities.cpp.
References anyTypeToString().
Referenced by llvm::checkStackTop(), llvm::WebAssemblyTargetAsmStreamer::emitGlobalType(), llvm::WebAssemblyTargetAsmStreamer::emitTableType(), printTypes(), and typeListToString().
void llvm::WebAssembly::wasmSymbolSetType | ( | MCSymbolWasm * | Sym, |
const Type * | GlobalVT, | ||
const ArrayRef< MVT > & | VTs | ||
) |
Sets a Wasm Symbol Type.
Definition at line 65 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::Type::getArrayElementType(), llvm::Type::isArrayTy(), isWebAssemblyExternrefType(), isWebAssemblyFuncrefType(), isWebAssemblyReferenceType(), llvm::report_fatal_error(), llvm::ArrayRef< T >::size(), Sym, toValType(), llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, and llvm::wasm::WASM_SYMBOL_TYPE_TABLE.
Referenced by llvm::WebAssemblyAsmPrinter::emitGlobalVariable().
Definition at line 24 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 25 of file WebAssemblyUtilities.cpp.
Definition at line 144 of file WebAssemblyMCTargetDesc.h.
Instruction opcodes emitted via means other than CodeGen.
Definition at line 143 of file WebAssemblyMCTargetDesc.h.
Definition at line 27 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 26 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().