LLVM 17.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 |
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 46 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 30 of file WebAssemblyTypeUtilities.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 146 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 84 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 159 of file WebAssemblyUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and llvm_unreachable.
Referenced by llvm::WebAssemblyInstrInfo::copyPhysReg(), maybeRewriteToFallthrough(), and unstackifyVRegsUsedInSplitBB().
Definition at line 274 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 145 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 120 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 101 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().
int llvm::WebAssembly::getWasm64Opcode | ( | unsigned short | Opcode | ) |
Definition at line 326 of file WebAssemblyMCTargetDesc.h.
Referenced by addImplicitDefs(), llvm::WebAssemblyFrameLowering::emitPrologue(), and hasArgumentDef().
|
inline |
Definition at line 426 of file WebAssemblyMCTargetDesc.h.
References MI.
Definition at line 402 of file WebAssemblyMCTargetDesc.h.
Definition at line 414 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().
Definition at line 458 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 29 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 282 of file WebAssemblyMCTargetDesc.h.
Definition at line 358 of file WebAssemblyMCTargetDesc.h.
Definition at line 44 of file WebAssemblyTypeUtilities.h.
References WASM_ADDRESS_SPACE_DEFAULT.
Referenced by isValidAddressSpace().
Definition at line 58 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_EXTERNREF.
Referenced by isRefType(), and wasmSymbolSetType().
Definition at line 53 of file WebAssemblyTypeUtilities.h.
References llvm::Type::getPointerAddressSpace(), and WASM_ADDRESS_SPACE_FUNCREF.
Referenced by isRefType(), and wasmSymbolSetType().
Definition at line 470 of file WebAssemblyMCTargetDesc.h.
Definition at line 492 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 514 of file WebAssemblyMCTargetDesc.h.
Referenced by llvm::WebAssemblyInstrInfo::isExplicitTargetIndexDef().
Definition at line 438 of file WebAssemblyMCTargetDesc.h.
Referenced by findCatch().
Definition at line 63 of file WebAssemblyTypeUtilities.h.
References isExternrefType(), and isFuncrefType().
|
inline |
Definition at line 43 of file WebAssemblyMCTypeUtilities.h.
References llvm::wasm::EXTERNREF, and llvm::wasm::FUNCREF.
Referenced by wasmSymbolSetType().
Definition at line 310 of file WebAssemblyMCTargetDesc.h.
Referenced by isSameScalarConst().
Definition at line 380 of file WebAssemblyMCTargetDesc.h.
Referenced by unstackifyVRegsUsedInSplitBB().
Definition at line 50 of file WebAssemblyTypeUtilities.h.
References isDefaultAddressSpace(), and isWasmVarAddressSpace().
Definition at line 47 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 40 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 24 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 | ( | const TargetRegisterClass * | RC | ) |
Definition at line 66 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::TargetRegisterClass::getID(), and regClassToValType().
wasm::ValType llvm::WebAssembly::regClassToValType | ( | unsigned | RC | ) |
Definition at line 105 of file WebAssemblyMCTypeUtilities.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 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 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 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 71 of file WebAssemblyTypeUtilities.cpp.
References assert(), llvm::Type::getArrayElementType(), llvm::Type::isArrayTy(), isExternrefType(), isFuncrefType(), isRefType(), 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 22 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 23 of file WebAssemblyUtilities.cpp.
Definition at line 142 of file WebAssemblyMCTargetDesc.h.
Instruction opcodes emitted via means other than CodeGen.
Definition at line 141 of file WebAssemblyMCTargetDesc.h.
Definition at line 25 of file WebAssemblyUtilities.cpp.
Referenced by mayThrow().
Definition at line 24 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().