Trait yaxpeax_core::data::LocationAliasDescriptions [−][src]
pub trait LocationAliasDescriptions<A: ValueLocations> {
fn may_alias(&self, left: &A::Location, right: &A::Location) -> bool;
fn aliases_for(&self, loc: &A::Location) -> Vec<A::Location>;
}
Expand description
LocationAliasDescriptions
is the rules describing how all locations in some data-flow graph
may overlap. it is a logical error for, as an example, for a LocationAliasDescriptions
to be
used on a graph including locations from a Disambiguator::disambiguate
that are not in
Self
.
Required methods
primarily for memory locations; returns true
if left
and right
may refer to any of
the same state, false
if left
and right
are totally disjoint.
Disambiguator::may_alias(rcx, ch)
should always be true.
Disambiguator::may_alias(any[rsp_input + 4, 4], any[rsp_input + 8, 4])
should always be false.
Disambiguator::may_alias(any[rcx_input + 4, 4], any[rsp_input + 4, 4])
should be true if rcx
or rsp
are unknown, or are known to potentially alias.
fn aliases_for(&self, loc: &A::Location) -> Vec<A::Location>
fn aliases_for(&self, loc: &A::Location) -> Vec<A::Location>
what other locations may loc
overlap with?
returns the set of locations known to Self
, which should be all locations in a given
function, that can overlap with loc
.
TODO: some kind of iterator built on &self
to avoid the vec alloc/collect…