22 .Case(
"i32", wasm::ValType::I32)
23 .Case(
"i64", wasm::ValType::I64)
24 .Case(
"f32", wasm::ValType::F32)
25 .Case(
"f64", wasm::ValType::F64)
26 .Cases(
"v128",
"i8x16",
"i16x8",
"i32x4",
"i64x2",
"f32x4",
"f64x2",
28 .Case(
"funcref", wasm::ValType::FUNCREF)
29 .Case(
"externref", wasm::ValType::EXTERNREF)
30 .Case(
"exnref", wasm::ValType::EXNREF)
31 .Default(std::nullopt);
37 .
Case(
"i32", WebAssembly::BlockType::I32)
38 .
Case(
"i64", WebAssembly::BlockType::I64)
39 .
Case(
"f32", WebAssembly::BlockType::F32)
40 .
Case(
"f64", WebAssembly::BlockType::F64)
41 .
Case(
"v128", WebAssembly::BlockType::V128)
42 .
Case(
"funcref", WebAssembly::BlockType::Funcref)
43 .
Case(
"externref", WebAssembly::BlockType::Externref)
44 .
Case(
"exnref", WebAssembly::BlockType::Exnref)
45 .
Case(
"void", WebAssembly::BlockType::Void)
46 .
Default(WebAssembly::BlockType::Invalid);
74 return "invalid_type";
103 case WebAssembly::I32RegClassID:
104 return wasm::ValType::I32;
105 case WebAssembly::I64RegClassID:
106 return wasm::ValType::I64;
107 case WebAssembly::F32RegClassID:
108 return wasm::ValType::F32;
109 case WebAssembly::F64RegClassID:
110 return wasm::ValType::F64;
111 case WebAssembly::V128RegClassID:
112 return wasm::ValType::V128;
113 case WebAssembly::FUNCREFRegClassID:
114 return wasm::ValType::FUNCREF;
115 case WebAssembly::EXTERNREFRegClassID:
116 return wasm::ValType::EXTERNREF;
117 case WebAssembly::EXNREFRegClassID:
118 return wasm::ValType::EXNREF;
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