LLVM  10.0.0svn
Enumerations | Functions | Variables
llvm::WebAssembly Namespace Reference

Enumerations

enum  Fixups {
  fixup_sleb128_i32 = FirstTargetFixupKind, fixup_sleb128_i64, fixup_uleb128_i32, LastTargetFixupKind,
  NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
}
 
enum  OperandType {
  OPERAND_BASIC_BLOCK = MCOI::OPERAND_FIRST_TARGET, OPERAND_LOCAL, OPERAND_GLOBAL, OPERAND_I32IMM,
  OPERAND_I64IMM, OPERAND_F32IMM, OPERAND_F64IMM, OPERAND_VEC_I8IMM,
  OPERAND_VEC_I16IMM, OPERAND_VEC_I32IMM, OPERAND_VEC_I64IMM, OPERAND_FUNCTION32,
  OPERAND_OFFSET32, OPERAND_P2ALIGN, OPERAND_SIGNATURE, OPERAND_TYPEINDEX,
  OPERAND_EVENT, OPERAND_BRLIST
}
 
enum  BlockType : unsigned {
  BlockType::Invalid = 0x00, BlockType::Void = 0x40, BlockType::I32 = unsigned(wasm::ValType::I32), BlockType::I64 = unsigned(wasm::ValType::I64),
  BlockType::F32 = unsigned(wasm::ValType::F32), BlockType::F64 = unsigned(wasm::ValType::F64), BlockType::V128 = unsigned(wasm::ValType::V128), BlockType::Exnref = unsigned(wasm::ValType::EXNREF),
  BlockType::Multivalue = 0xffff
}
 Used as immediate MachineOperands for block signatures. More...
 

Functions

const chartypeToString (wasm::ValType Ty)
 
const charanyTypeToString (unsigned Ty)
 
std::string typeListToString (ArrayRef< wasm::ValType > List)
 
std::string signatureToString (const wasm::WasmSignature *Sig)
 
wasm::ValType toValType (const MVT &Ty)
 
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)
 
unsigned getCalleeOpNo (unsigned Opc)
 Returns the operand number of a callee, assuming the argument is a call instruction. More...
 
bool isMarker (unsigned Opc)
 
int16_t getNamedOperandIdx (uint16_t Opcode, uint16_t NamedIndex)
 
FastISelcreateFastISel (FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo)
 
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)
 
template<typename T >
MachineBasicBlockgetBottom (const T *Unit)
 Return the "bottom" block of an entity, which can be either a MachineLoop or WebAssemblyException. More...
 

Variables

static const unsigned Nop = 0x01
 Instruction opcodes emitted via means other than CodeGen. More...
 
static const unsigned End = 0x0b
 
const char *const ClangCallTerminateFn = "__clang_call_terminate"
 
const char *const CxaBeginCatchFn = "__cxa_begin_catch"
 
const char *const CxaRethrowFn = "__cxa_rethrow"
 
const char *const StdTerminateFn = "_ZSt9terminatev"
 
const char *const PersonalityWrapperFn
 

Enumeration Type Documentation

◆ BlockType

Used as immediate MachineOperands for block signatures.

Enumerator
Invalid 
Void 
I32 
I64 
F32 
F64 
V128 
Exnref 
Multivalue 

Definition at line 126 of file WebAssemblyMCTargetDesc.h.

◆ Fixups

Enumerator
fixup_sleb128_i32 
fixup_sleb128_i64 
fixup_uleb128_i32 
LastTargetFixupKind 
NumTargetFixupKinds 

Definition at line 16 of file WebAssemblyFixupKinds.h.

◆ OperandType

Enumerator
OPERAND_BASIC_BLOCK 

Basic block label in a branch construct.

OPERAND_LOCAL 

Local index.

OPERAND_GLOBAL 

Global index.

OPERAND_I32IMM 

32-bit integer immediates.

OPERAND_I64IMM 

64-bit integer immediates.

OPERAND_F32IMM 

32-bit floating-point immediates.

OPERAND_F64IMM 

64-bit floating-point immediates.

OPERAND_VEC_I8IMM 

8-bit vector lane immediate

OPERAND_VEC_I16IMM 

16-bit vector lane immediate

OPERAND_VEC_I32IMM 

32-bit vector lane immediate

OPERAND_VEC_I64IMM 

64-bit vector lane immediate

OPERAND_FUNCTION32 

32-bit unsigned function indices.

OPERAND_OFFSET32 

32-bit unsigned memory offsets.

OPERAND_P2ALIGN 

p2align immediate for load and store address alignment.

OPERAND_SIGNATURE 

signature immediate for block/loop.

OPERAND_TYPEINDEX 

type signature immediate for call_indirect.

OPERAND_EVENT 

Event index.

OPERAND_BRLIST 

A list of branch targets for br_list.

Definition at line 44 of file WebAssemblyMCTargetDesc.h.

Function Documentation

◆ anyTypeToString()

const char * llvm::WebAssembly::anyTypeToString ( unsigned  Ty)

◆ createFastISel()

FastISel * llvm::WebAssembly::createFastISel ( FunctionLoweringInfo funcInfo,
const TargetLibraryInfo libInfo 
)

◆ getBottom()

template<typename T >
MachineBasicBlock* llvm::WebAssembly::getBottom ( const T Unit)

Return the "bottom" block of an entity, which can be either a MachineLoop or WebAssemblyException.

This differs from MachineLoop::getBottomBlock in that it works even if the entity is discontiguous.

Definition at line 39 of file WebAssemblyUtilities.h.

References llvm::MachineBasicBlock::getNumber().

Referenced by sortBlocks().

◆ getCalleeOpNo()

unsigned llvm::WebAssembly::getCalleeOpNo ( unsigned  Opc)
inline

Returns the operand number of a callee, assuming the argument is a call instruction.

Definition at line 512 of file WebAssemblyMCTargetDesc.h.

References llvm_unreachable.

Referenced by mayThrow(), and query().

◆ GetDefaultP2Align()

unsigned llvm::WebAssembly::GetDefaultP2Align ( unsigned  Opc)
inline

◆ GetDefaultP2AlignAny()

unsigned llvm::WebAssembly::GetDefaultP2AlignAny ( unsigned  Opc)
inline

Return the default p2align value for a load or store with the given opcode.

Definition at line 150 of file WebAssemblyMCTargetDesc.h.

Referenced by GetDefaultP2Align().

◆ getNamedOperandIdx()

int16_t llvm::WebAssembly::getNamedOperandIdx ( uint16_t  Opcode,
uint16_t  NamedIndex 
)

◆ isArgument()

bool llvm::WebAssembly::isArgument ( unsigned  Opc)
inline

◆ isCallDirect()

bool llvm::WebAssembly::isCallDirect ( unsigned  Opc)
inline

Definition at line 442 of file WebAssemblyMCTargetDesc.h.

◆ isCallIndirect()

bool llvm::WebAssembly::isCallIndirect ( unsigned  Opc)
inline

Definition at line 476 of file WebAssemblyMCTargetDesc.h.

Referenced by llvm::WebAssemblyMCInstLower::lower(), and mayThrow().

◆ isChild()

bool llvm::WebAssembly::isChild ( const MachineInstr MI,
const WebAssemblyFunctionInfo MFI 
)

◆ isCopy()

bool llvm::WebAssembly::isCopy ( unsigned  Opc)
inline

Definition at line 402 of file WebAssemblyMCTargetDesc.h.

Referenced by findStartOfTree().

◆ isMarker()

bool llvm::WebAssembly::isMarker ( unsigned  Opc)
inline

◆ isTee()

bool llvm::WebAssembly::isTee ( unsigned  Opc)
inline

Definition at line 422 of file WebAssemblyMCTargetDesc.h.

Referenced by findStartOfTree().

◆ mayThrow()

bool llvm::WebAssembly::mayThrow ( const MachineInstr MI)

◆ signatureToString()

std::string llvm::WebAssembly::signatureToString ( const wasm::WasmSignature Sig)

◆ toValType()

wasm::ValType llvm::WebAssembly::toValType ( const MVT Ty)

◆ typeListToString()

std::string llvm::WebAssembly::typeListToString ( ArrayRef< wasm::ValType List)

◆ typeToString()

const char * llvm::WebAssembly::typeToString ( wasm::ValType  Ty)

Variable Documentation

◆ ClangCallTerminateFn

const char *const llvm::WebAssembly::ClangCallTerminateFn = "__clang_call_terminate"

Definition at line 20 of file WebAssemblyUtilities.cpp.

Referenced by eraseDeadBBsAndChildren(), and mayThrow().

◆ CxaBeginCatchFn

const char *const llvm::WebAssembly::CxaBeginCatchFn = "__cxa_begin_catch"

Definition at line 21 of file WebAssemblyUtilities.cpp.

Referenced by mayThrow().

◆ CxaRethrowFn

const char *const llvm::WebAssembly::CxaRethrowFn = "__cxa_rethrow"

Definition at line 22 of file WebAssemblyUtilities.cpp.

◆ End

const unsigned llvm::WebAssembly::End = 0x0b
static

Definition at line 145 of file WebAssemblyMCTargetDesc.h.

◆ Nop

const unsigned llvm::WebAssembly::Nop = 0x01
static

Instruction opcodes emitted via means other than CodeGen.

Definition at line 144 of file WebAssemblyMCTargetDesc.h.

Referenced by llvm::HexagonMCInstrInfo::padEndloop().

◆ PersonalityWrapperFn

const char *const llvm::WebAssembly::PersonalityWrapperFn
Initial value:
=
"_Unwind_Wasm_CallPersonality"

Definition at line 24 of file WebAssemblyUtilities.cpp.

Referenced by mayThrow().

◆ StdTerminateFn

const char *const llvm::WebAssembly::StdTerminateFn = "_ZSt9terminatev"

Definition at line 23 of file WebAssemblyUtilities.cpp.

Referenced by mayThrow().