pub enum QPtrAttr {
ToSpvPtrInput {
input_idx: u32,
pointee: OrdAssertEq<Type>,
},
FromSpvPtrOutput {
addr_space: OrdAssertEq<AddrSpace>,
pointee: OrdAssertEq<Type>,
},
Usage(OrdAssertEq<QPtrUsage>),
}Expand description
QPtr-specific attributes ([Attr::QPtr]).
Variants§
ToSpvPtrInput
When applied to a DataInst with a QPtr-typed inputs[input_idx],
this describes the original OpTypePointer consumed by an unknown
SPIR-V instruction (which may, or may not, access memory, at all).
Assumes the original SPIR-V StorageClass is redundant (i.e. can be
deduced from the pointer’s provenance), and that any accesses performed
through the pointer (or any pointers derived from it) stay within bounds
(i.e. logical pointer semantics, unsuited for e.g. OpPtrAccessChain).
FromSpvPtrOutput
When applied to a DataInst with a QPtr-typed output value,
this describes the original OpTypePointer produced by an unknown
SPIR-V instruction (likely creating it, without deriving from an input).
Assumes the original SPIR-V StorageClass is significant (e.g. fresh
provenance being created on the fly via OpConvertUToPtr, or derived
internally by the implementation via OpImageTexelPointer).
Usage(OrdAssertEq<QPtrUsage>)
When applied to a QPtr-typed GlobalVar, DataInst,
ControlRegionInputDecl or ControlNodeOutputDecl, this tracks all the
ways in which the pointer may be used (see QPtrUsage).
Trait Implementations§
Source§impl Ord for QPtrAttr
impl Ord for QPtrAttr
Source§impl PartialOrd for QPtrAttr
impl PartialOrd for QPtrAttr
impl Eq for QPtrAttr
impl StructuralPartialEq for QPtrAttr
Auto Trait Implementations§
impl Freeze for QPtrAttr
impl RefUnwindSafe for QPtrAttr
impl !Send for QPtrAttr
impl !Sync for QPtrAttr
impl Unpin for QPtrAttr
impl UnwindSafe for QPtrAttr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
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>
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>
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