pub struct Preserved(/* private fields */);Expand description
What a pass leaves standing.
A set rather than the three cases the design writes, because Preserved::ALL and
Preserved::NONE are the full set and the empty one and a named set is what is between
them. A pass that adds an analysis to this list is saying the code it produced answers the
same questions the code it was given did, which is a claim about a pass and not about a run,
so it is stated once on the pass rather than returned from each call.
Implementations§
Source§impl Preserved
impl Preserved
Sourcepub const ALL: Preserved
pub const ALL: Preserved
Everything, which is what a pass that does not change the shape of a function says.
Sourcepub const NONE: Preserved
pub const NONE: Preserved
Nothing, which is what a pass that moves an edge says, however small the move was.
Sourcepub const fn without(self, analysis: Analysis) -> Self
pub const fn without(self, analysis: Analysis) -> Self
This set without that analysis.
The way a pass says “everything except one thing”, which is what a pass that rewrites operands and moves no edge has to say: the shape of the function is what it was and the liveness is not, because a value read in one more place is live in one more place.