pub struct ReachingDefinitionAnalysis {
    pub reach: BTreeMap<GroupOrInvoke, DefSet>,
    pub meta: MetadataMap,
}
Expand description

A struct used to compute a reaching definition analysis. The only field is a map between GroupOrInvoke labels and the definitions that exit the given group or the given Invoke node. This analysis is conservative and will only kill a definition if the group MUST write the given register and does not read it. If this is not the case old definitions will remain in the reaching set as we cannot be certain that they have been killed.

Note that this analysis assumes that groups do not appear more than once within the control structure and will provide inaccurate results if this expectation is violated.

Like super::LiveRangeAnalysis par blocks are treated via a parallel CFG approach. Concretely this means that after a par block executes any id that is killed by one arm is killed and all defs introduced (but not killed) by any arm are defined. Note that this assumes separate arms are not writing the same register or reading a registe that is written by another arm.

Fields

reach: BTreeMap<GroupOrInvoke, DefSet>meta: MetadataMap

Implementations

Constructs a reaching definition analysis for registers over the given control structure. Will include dummy “definitions” for invoke statements which can be ignored if one is not rewriting values NOTE: Assumes that each group appears at only one place in the control structure.

Provides a map containing a vector of sets for each register. The sets within contain separate groupings of definitions for the given register. If the vector contains one set, then all the definitions for the given register name must have the same name. NOTE: Includes dummy “definitions” for continuous assignments and uses within groups and invoke statements. This is to ensure that all uses of a given register are rewriten with the appropriate name.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.