24 return wasm::ValType::I32;
26 return wasm::ValType::I64;
28 return wasm::ValType::F32;
30 return wasm::ValType::F64;
31 if (
Type ==
"v128" ||
Type ==
"i8x16" ||
Type ==
"i16x8" ||
Type ==
"i32x4" ||
33 return wasm::ValType::V128;
34 if (
Type ==
"funcref")
35 return wasm::ValType::FUNCREF;
36 if (
Type ==
"externref")
37 return wasm::ValType::EXTERNREF;
44 .
Case(
"i32", WebAssembly::BlockType::I32)
45 .
Case(
"i64", WebAssembly::BlockType::I64)
46 .
Case(
"f32", WebAssembly::BlockType::F32)
47 .
Case(
"f64", WebAssembly::BlockType::F64)
48 .
Case(
"v128", WebAssembly::BlockType::V128)
49 .
Case(
"funcref", WebAssembly::BlockType::Funcref)
50 .
Case(
"externref", WebAssembly::BlockType::Externref)
51 .
Case(
"void", WebAssembly::BlockType::Void)
52 .
Default(WebAssembly::BlockType::Invalid);
78 return "invalid_type";
107 case WebAssembly::I32RegClassID:
108 return wasm::ValType::I32;
109 case WebAssembly::I64RegClassID:
110 return wasm::ValType::I64;
111 case WebAssembly::F32RegClassID:
112 return wasm::ValType::F32;
113 case WebAssembly::F64RegClassID:
114 return wasm::ValType::F64;
115 case WebAssembly::V128RegClassID:
116 return wasm::ValType::V128;
117 case WebAssembly::FUNCREFRegClassID:
118 return wasm::ValType::FUNCREF;
119 case WebAssembly::EXTERNREFRegClassID:
120 return wasm::ValType::EXTERNREF;
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
This file provides WebAssembly-specific target descriptions.
This file contains the declaration of the WebAssembly-specific type parsing utility functions.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
The instances of the Type class are immutable: once they are created, they are never changed.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const char * typeToString(wasm::ValType Type)
BlockType parseBlockType(StringRef Type)
wasm::ValType regClassToValType(unsigned RC)
BlockType
Used as immediate MachineOperands for block signatures.
std::string signatureToString(const wasm::WasmSignature *Sig)
const char * anyTypeToString(unsigned Type)
std::string typeListToString(ArrayRef< wasm::ValType > List)
std::optional< wasm::ValType > parseType(StringRef Type)
This is an optimization pass for GlobalISel generic memory operations.
SmallVector< ValType, 1 > Returns
SmallVector< ValType, 4 > Params