Function sequant::eval::detail::ordered_visit_skip_seedable(TableCell const&)

Function Documentation

inline bool sequant::eval::detail::ordered_visit_skip_seedable(TableCell const &c)

Whether c may be seeded into a per-visit skip set (run_ordered_contracted_block's own, at block entry).

Two conditions, and the second is the one that is easy to lose: the cell must be produce_if_absent (its production is elided precisely while it stays resident), and it must be bound to no loop instance. A per-visit set is computed once at a block’s entry and consulted across every batch of that block and inside every nested block, while CellRegistry::clear_bound_to empties the cells bound to a loop instance whenever that loop advances — this block’s own loop at each of its batches, a nested loop at each of its. A bound cell can therefore lose its value under a mark that still says “skip”, and its production would be elided while its consumers still need it. An unbound produce_if_absent

cell is reachable by no clear at all (the implicit “its scope’s innermost

loop” rule exempts exactly these), so a mark on it stays true.