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 PartialEq<QPtrAttr> for QPtrAttr
impl PartialEq<QPtrAttr> for QPtrAttr
source§impl PartialOrd<QPtrAttr> for QPtrAttr
impl PartialOrd<QPtrAttr> for QPtrAttr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for QPtrAttr
impl StructuralEq for QPtrAttr
impl StructuralPartialEq for QPtrAttr
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.