Enum spirt::qptr::QPtrMemUsageKind
source · pub enum QPtrMemUsageKind {
Unused,
StrictlyTyped(Type),
DirectAccess(Type),
OffsetBase(Rc<BTreeMap<u32, QPtrMemUsage>>),
DynOffsetBase {
element: Rc<QPtrMemUsage>,
stride: NonZeroU32,
},
}
Variants§
Unused
Not actually used, which could be caused by pointer offsetting operations with unused results, or as an intermediary state during analyses.
StrictlyTyped(Type)
Used as a typed pointer (e.g. via unknown SPIR-V instructions), requiring
a specific choice of pointee type which cannot be modified, and has to be
reused as-is when lifting QPtr
s back to typed pointers.
Other overlapping uses can be merged into this one as long as they can be fully expressed using the (transitive) components of this type.
DirectAccess(Type)
Used directly to access memory (e.g. QPtrOp::Load
, QPtrOp::Store
),
which can be decomposed as necessary (down to individual scalar leaves),
to allow maximal merging opportunities.
OffsetBase(Rc<BTreeMap<u32, QPtrMemUsage>>)
Used as a common base for (constant) offsetting, which requires it to have
its own (aggregate) type, when lifting QPtr
s back to typed pointers.
DynOffsetBase
Used as a common base for (dynamic) offsetting, which requires it to have
its own (array) type, when lifting QPtr
s back to typed pointers, with
one single element type being repeated across the entire size.
Trait Implementations§
source§impl Clone for QPtrMemUsageKind
impl Clone for QPtrMemUsageKind
source§fn clone(&self) -> QPtrMemUsageKind
fn clone(&self) -> QPtrMemUsageKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Hash for QPtrMemUsageKind
impl Hash for QPtrMemUsageKind
source§impl InnerTransform for QPtrMemUsageKind
impl InnerTransform for QPtrMemUsageKind
fn inner_transform_with( &self, transformer: &mut impl Transformer ) -> Transformed<Self>
source§impl InnerVisit for QPtrMemUsageKind
impl InnerVisit for QPtrMemUsageKind
fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>)
source§impl PartialEq<QPtrMemUsageKind> for QPtrMemUsageKind
impl PartialEq<QPtrMemUsageKind> for QPtrMemUsageKind
source§fn eq(&self, other: &QPtrMemUsageKind) -> bool
fn eq(&self, other: &QPtrMemUsageKind) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for QPtrMemUsageKind
impl StructuralEq for QPtrMemUsageKind
impl StructuralPartialEq for QPtrMemUsageKind
Auto Trait Implementations§
impl RefUnwindSafe for QPtrMemUsageKind
impl !Send for QPtrMemUsageKind
impl !Sync for QPtrMemUsageKind
impl Unpin for QPtrMemUsageKind
impl UnwindSafe for QPtrMemUsageKind
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<'a, T, V> DynInnerVisit<'a, V> for Twhere
T: InnerVisit,
V: Visitor<'a>,
impl<'a, T, V> DynInnerVisit<'a, V> for Twhere T: InnerVisit, V: Visitor<'a>,
fn dyn_inner_visit_with(&'a self, visitor: &mut V)
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.