pub struct FatLoop {
    pub invariants: BTreeMap<CodeOffset, (AttrId, Exp)>,
    pub val_targets: BTreeSet<TempIndex>,
    pub mut_targets: BTreeMap<TempIndex, bool>,
    pub back_edges: BTreeSet<CodeOffset>,
}
Expand description

A fat-loop captures the information of one or more natural loops that share the same loop header. This shared header is called the header of the fat-loop.

Conceptually, every back edge defines a unique natural loop and different back edges may points to the same loop header (e.g., when there are two “continue” statements in the loop body).

However, since these natural loops share the same loop header, they share the same loop invariants too and the fat-loop targets (i.e., variables that may be changed in any sub-loop) is the union of loop targets per each natural loop that share the header.

Fields

invariants: BTreeMap<CodeOffset, (AttrId, Exp)>val_targets: BTreeSet<TempIndex>mut_targets: BTreeMap<TempIndex, bool>back_edges: BTreeSet<CodeOffset>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.