LLVM 20.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 |
cl::opt< bool > | WasmEnableExnref |
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 | |
Exnref | |
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 49 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 92 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 51 of file WebAssemblyMCTypeUtilities.cpp.
References llvm::wasm::WASM_TYPE_EXNREF, 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().
bool llvm::WebAssembly::canLowerMultivalueReturn | ( | const WebAssemblySubtarget * | Subtarget | ) |
Returns true if multivalue returns of a function can be lowered directly, i.e., not indirectly via a pointer parameter that points to the value in memory.
Definition at line 186 of file WebAssemblyUtilities.cpp.
References llvm::WebAssemblySubtarget::getTargetLowering(), llvm::TargetLoweringBase::getTargetMachine(), and llvm::WebAssemblySubtarget::hasMultivalue().
Referenced by canLowerReturn(), and getLibcallSignature().
bool llvm::WebAssembly::canLowerReturn | ( | size_t | ResultSize, |
const WebAssemblySubtarget * | Subtarget | ||
) |
Returns true if the function's return value(s) can be lowered directly, i.e., not indirectly via a pointer parameter that points to the value in memory.
Definition at line 193 of file WebAssemblyUtilities.cpp.
References canLowerMultivalueReturn().
Referenced by llvm::computeSignatureVTs().
FastISel * llvm::WebAssembly::createFastISel | ( | FunctionLoweringInfo & | funcInfo, |
const TargetLibraryInfo * | libInfo | ||
) |
Definition at line 1440 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 149 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 162 of file WebAssemblyUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstrInfo::copyPhysReg(), maybeRewriteToFallthrough(), and unstackifyVRegsUsedInSplitBB().
Definition at line 279 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 148 of file WebAssemblyMCTargetDesc.h.
References WASM_LOAD_STORE.
Referenced by GetDefaultP2Align().
void llvm::WebAssembly::getLibcallSignature | ( | const WebAssemblySubtarget & | Subtarget, |
RTLIB::Libcall | LC, | ||
SmallVectorImpl< wasm::ValType > & | Rets, | ||
SmallVectorImpl< wasm::ValType > & | Params | ||
) |
Definition at line 549 of file WebAssemblyRuntimeLibcallSignatures.cpp.
References assert(), canLowerMultivalueReturn(), llvm::SmallVectorBase< Size_T >::empty(), llvm::WebAssemblySubtarget::hasAddr64(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and unsupported().
Referenced by getLibcallSignature(), and llvm::WebAssemblyAsmPrinter::getOrCreateWasmSymbol().
void llvm::WebAssembly::getLibcallSignature | ( | const WebAssemblySubtarget & | Subtarget, |
StringRef | Name, | ||
SmallVectorImpl< wasm::ValType > & | Rets, | ||
SmallVectorImpl< wasm::ValType > & | Params | ||
) |
Definition at line 914 of file WebAssemblyRuntimeLibcallSignatures.cpp.
References getLibcallSignature(), llvm_unreachable, and Name.
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 123 of file WebAssemblyUtilities.cpp.
References llvm::MCContext::getOrCreateSymbol(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::MCContext::lookupSymbol(), Name, llvm::MCContext::reportError(), Sym, and llvm::wasm::WASM_SYMBOL_TYPE_TABLE.
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::getTargetTriple(), llvm::WebAssemblySubtarget::hasReferenceTypes(), llvm::Triple::isArch64Bit(), 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 558 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstPrinter::printOperand().
int llvm::WebAssembly::getWasm64Opcode | ( | unsigned short | Opcode | ) |
Definition at line 331 of file WebAssemblyMCTargetDesc.h.
Referenced by addImplicitDefs(), llvm::WebAssemblyFrameLowering::emitPrologue(), and hasArgumentDef().
Definition at line 439 of file WebAssemblyMCTargetDesc.h.
Definition at line 415 of file WebAssemblyMCTargetDesc.h.
Definition at line 427 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().
Definition at line 471 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 287 of file WebAssemblyMCTargetDesc.h.
Definition at line 367 of file WebAssemblyMCTargetDesc.h.
Definition at line 34 of file WasmAddressSpaces.h.
References WASM_ADDRESS_SPACE_DEFAULT.
Referenced by isValidAddressSpace().
Definition at line 483 of file WebAssemblyMCTargetDesc.h.
Definition at line 507 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 531 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 451 of file WebAssemblyMCTargetDesc.h.
Referenced by findCatch().
|
inline |
Definition at line 44 of file WebAssemblyMCTypeUtilities.h.
References llvm::wasm::EXNREF, llvm::wasm::EXTERNREF, and llvm::wasm::FUNCREF.
Definition at line 315 of file WebAssemblyMCTargetDesc.h.
Referenced by isSameScalarConst().
Definition at line 391 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(), llvm::Type::isPointerTy(), and WASM_ADDRESS_SPACE_EXTERNREF.
Referenced by isWebAssemblyReferenceType(), and wasmSymbolSetType().
Return true if this is a WebAssembly Funcref Type.
Definition at line 37 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), llvm::Type::isPointerTy(), and WASM_ADDRESS_SPACE_FUNCREF.
Referenced by isWebAssemblyReferenceType(), and wasmSymbolSetType().
Return true if this is a WebAssembly Reference Type.
Definition at line 44 of file WebAssemblyTypeUtilities.h.
References isWebAssemblyExternrefType(), and isWebAssemblyFuncrefType().
Referenced by isWebAssemblyTableType().
Return true if the table represents a WebAssembly table type.
Definition at line 49 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getArrayElementType(), llvm::Type::isArrayTy(), and isWebAssemblyReferenceType().
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 34 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 101 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 92 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 40 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 82 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 78 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, | ||
ArrayRef< MVT > | VTs | ||
) |
Sets a Wasm Symbol Type.
Definition at line 69 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::Type::getArrayElementType(), isWebAssemblyExternrefType(), isWebAssemblyFuncrefType(), isWebAssemblyTableType(), 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 145 of file WebAssemblyMCTargetDesc.h.
Instruction opcodes emitted via means other than CodeGen.
Definition at line 144 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().