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

Enumerations

enum  Fixups {
  fixup_code_sleb128_i32 = FirstTargetFixupKind, fixup_code_sleb128_i64, fixup_code_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  ExprType : unsigned {
  ExprType::Void = 0x40, ExprType::I32 = 0x7F, ExprType::I64 = 0x7E, ExprType::F32 = 0x7D,
  ExprType::F64 = 0x7C, ExprType::V128 = 0x7B, ExprType::ExceptRef = 0x68, ExprType::Invalid = 0x00
}
 This is used to indicate block signatures. More...
 

Functions

const chartypeToString (wasm::ValType Ty)
 
const charanyTypeToString (unsigned Ty)
 
unsigned GetDefaultP2Align (unsigned Opcode)
 Return the default p2align value for a load or store with the given opcode. More...
 
wasm::ValType toValType (const MVT &Ty)
 
FastISelcreateFastISel (FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo)
 
bool isArgument (const MachineInstr &MI)
 
bool isCopy (const MachineInstr &MI)
 
bool isTee (const MachineInstr &MI)
 
bool isChild (const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI)
 Test whether MI is a child of some other node in an expression tree. More...
 
bool isCallDirect (const MachineInstr &MI)
 
bool isCallIndirect (const MachineInstr &MI)
 
bool isMarker (const MachineInstr &MI)
 
bool mayThrow (const MachineInstr &MI)
 
unsigned getCalleeOpNo (const MachineInstr &MI)
 Returns the operand number of a callee, assuming the argument is a call instruction. More...
 
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 LoadAddressOperandNo = 3
 The operand number of the load or store address in load/store instructions. More...
 
static const unsigned StoreAddressOperandNo = 2
 
static const unsigned LoadP2AlignOperandNo = 1
 The operand number of the load or store p2align in load/store instructions. More...
 
static const unsigned StoreP2AlignOperandNo = 0
 
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

◆ ExprType

This is used to indicate block signatures.

Enumerator
Void 
I32 
I64 
F32 
F64 
V128 
ExceptRef 
Invalid 

Definition at line 343 of file WebAssemblyMCTargetDesc.h.

◆ Fixups

Enumerator
fixup_code_sleb128_i32 
fixup_code_sleb128_i64 
fixup_code_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 46 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 49 of file WebAssemblyUtilities.h.

References llvm::MachineBasicBlock::getNumber().

Referenced by sortBlocks().

◆ getCalleeOpNo()

unsigned llvm::WebAssembly::getCalleeOpNo ( const MachineInstr MI)

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

Definition at line 168 of file WebAssemblyUtilities.cpp.

References llvm::MachineInstr::getOpcode(), and llvm_unreachable.

Referenced by mayThrow(), and query().

◆ GetDefaultP2Align()

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

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

Definition at line 120 of file WebAssemblyMCTargetDesc.h.

References llvm_unreachable.

Referenced by llvm::WebAssemblyInstPrinter::printWebAssemblyP2AlignOperand(), and rewriteP2Align().

◆ isArgument()

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

◆ isCallDirect()

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

Definition at line 104 of file WebAssemblyUtilities.cpp.

References llvm::MachineInstr::getOpcode().

◆ isCallIndirect()

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

◆ isChild()

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

◆ isCopy()

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

Definition at line 55 of file WebAssemblyUtilities.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by findStartOfTree().

◆ isMarker()

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

◆ isTee()

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

Definition at line 73 of file WebAssemblyUtilities.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by findStartOfTree().

◆ mayThrow()

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

◆ toValType()

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

◆ 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 356 of file WebAssemblyMCTargetDesc.h.

◆ LoadAddressOperandNo

const unsigned llvm::WebAssembly::LoadAddressOperandNo = 3
static

The operand number of the load or store address in load/store instructions.

Definition at line 335 of file WebAssemblyMCTargetDesc.h.

Referenced by llvm::WebAssemblyRegisterInfo::eliminateFrameIndex().

◆ LoadP2AlignOperandNo

const unsigned llvm::WebAssembly::LoadP2AlignOperandNo = 1
static

The operand number of the load or store p2align in load/store instructions.

Definition at line 339 of file WebAssemblyMCTargetDesc.h.

Referenced by rewriteP2Align().

◆ Nop

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

Instruction opcodes emitted via means other than CodeGen.

Definition at line 355 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().

◆ StoreAddressOperandNo

const unsigned llvm::WebAssembly::StoreAddressOperandNo = 2
static

◆ StoreP2AlignOperandNo

const unsigned llvm::WebAssembly::StoreP2AlignOperandNo = 0
static

Definition at line 340 of file WebAssemblyMCTargetDesc.h.

Referenced by rewriteP2Align().