Struct ValueCell

Struct Documentation

struct ValueCell

One value group in a rich linearized schedule (the working representation): the same per-value fold as Cell, but keeping the pieces Cell already collapses into footprint — carried and home_modes separately — plus the one genuinely new field, enclosing_modes, so a later spill pass (O2) has enough to consider demoting a carried mode into the home.

Public Members

std::size_t value_id

stable index of the value group (== its slot in RichSchedule::cells)

bool is_leaf = false

the value is a forest leaf (an input fetched on demand), not a computed intermediate — so it is never scheduled as a BuildStep.

std::size_t hash

the value’s node id (EvalExpr::hash_value(), the canonical colored graph): links a cell back to its forest nodes; batched-slot-blind.

std::size_t key = 0

the value id (value_key: node id combined with the home-sliced canonical positions, explicit-cells design section 11) — the identity that folds occurrences into this cell. 0 (a hand-built cell) means “== hash”; read it through value_key_of(ValueCell const&).

int home_depth

home_depth_of(home_scope, ectx) at the first occurrence — informational, as Cell::home_depth

container::svector<Index> carried

canon_indices (same across occurrences)

container::svector<Index> home_modes

the Phase-3b footprint home: r.home minus own_modes_union[hash], read off the first occurrence

container::svector<Index> enclosing_modes

union, over all occurrences, of every loop mode that ever encloses this value (ectx[i].first for each level of each occurrence’s ectx)

container::svector<Index> divergent_modes

relabeled modes: carried by some occurrences but not all (union minus intersection of the occurrences’ canon_indices). Informational only (see the note on peak_of_value above): nothing in the pipeline prices or acts on it, and the only out-of-file reader is a test asserting exactly that it is ignored.

std::size_t first_use

earliest static point the value is live at

std::size_t last_use

latest static point the value is live at (its last consumer), inclusive

container::svector<OccurrenceRec> occurrences

every use-site of this value. Load-bearing: compute_dag_boulevard's conflict-aware union-find runs over these records to derive physical loop identity, and value identity is derived from that (as-built design section 5.2).