Function sequant::eval::detail::set_residency_flags

Function Documentation

inline void sequant::eval::detail::set_residency_flags(TableCell &cell, bool volatile_value, container::svector<std::pair<LoopKey, int>> const &path)

Sets the produce_if_absent flag and the persistence candidacy of cell from its bound instances (bound_instances) against the current path: a cell is a persistence candidate iff it carries no volatile leaf and is bound to none of its enclosing loops; it is produced only on first visit (produce_if_absent) iff its scope is nested inside a loop it is not bound to on that loop’s own instance.

Note

Candidacy, not the final answer: persistence is the frontier of the invariant region, not all of it, and the remaining condition (at least one volatile consumer, or no consumer at all) can only be decided once the table’s reads exist. apply_persistence_frontier demotes the rest at the end of build_cell_table.