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 QPtrs 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 QPtrs back to typed pointers.
DynOffsetBase
Used as a common base for (dynamic) offsetting, which requires it to have
its own (array) type, when lifting QPtrs 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§const fn clone_from(&mut self, source: &Self)
const 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 for QPtrMemUsageKind
impl PartialEq for QPtrMemUsageKind
impl Eq for QPtrMemUsageKind
impl StructuralPartialEq for QPtrMemUsageKind
Auto Trait Implementations§
impl Freeze for QPtrMemUsageKind
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 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