18#define GET_REGINFO_ENUM
19#include "WebAssemblyGenRegisterInfo.inc"
25 .
Case(
"i32", MVT::i32)
26 .
Case(
"i64", MVT::i64)
27 .
Case(
"f32", MVT::f32)
28 .
Case(
"f64", MVT::f64)
29 .
Case(
"i64", MVT::i64)
30 .
Case(
"v16i8", MVT::v16i8)
31 .
Case(
"v8i16", MVT::v8i16)
32 .
Case(
"v4i32", MVT::v4i32)
33 .
Case(
"v2i64", MVT::v2i64)
34 .
Case(
"funcref", MVT::funcref)
35 .
Case(
"externref", MVT::externref)
40 switch (
Type.SimpleTy) {
42 return wasm::ValType::I32;
44 return wasm::ValType::I64;
46 return wasm::ValType::F32;
48 return wasm::ValType::F64;
55 return wasm::ValType::V128;
57 return wasm::ValType::FUNCREF;
59 return wasm::ValType::EXTERNREF;
79 ValTy = wasm::ValType::EXTERNREF;
81 ValTy = wasm::ValType::FUNCREF;
84 }
else if (VTs.
size() == 1) {
91 Sym->setTableType(ValTy);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
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),...
size_t size() const
size - Get the array size.
@ INVALID_SIMPLE_VALUE_TYPE
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.
bool isArrayTy() const
True if this is an instance of ArrayType.
Type * getArrayElementType() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool isWebAssemblyExternrefType(const Type *Ty)
Return true if this is a WebAssembly Externref Type.
bool isWebAssemblyFuncrefType(const Type *Ty)
Return true if this is a WebAssembly Funcref Type.
wasm::ValType toValType(MVT Type)
bool isWebAssemblyReferenceType(const Type *Ty)
Return true if this is a WebAssembly Reference Type.
void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT, const ArrayRef< MVT > &VTs)
Sets a Wasm Symbol Type.
MVT parseMVT(StringRef Type)
@ WASM_SYMBOL_TYPE_GLOBAL
This is an optimization pass for GlobalISel generic memory operations.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.