pub enum TypeKind {
QPtr,
SpvInst {
spv_inst: Inst,
type_and_const_inputs: SmallVec<[TypeOrConst; 2]>,
},
SpvStringLiteralForExtInst,
}
Variants§
QPtr
“Quasi-pointer”, an untyped pointer-like abstract scalar that can represent
both memory locations (in any address space) and other kinds of locations
(e.g. SPIR-V OpVariable
s in non-memory “storage classes”).
This flexibility can be used to represent pointers from source languages that expect/are defined to operate on untyped memory (C, C++, Rust, etc.), that can then be legalized away (e.g. via inlining) or even emulated.
Information narrowing down how values of the type may be created/used
(e.g. “points to variable x
” or “accessed at offset y
”) can be found
attached as Attr
s on those Value
s (see Attr::QPtr
).
SpvInst
SpvStringLiteralForExtInst
The type of a ConstKind::SpvStringLiteralForExtInst
constant, i.e.
a SPIR-V OpString
with no actual type in SPIR-V.
Trait Implementations§
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more