Template Function sequant::eval::compute_dag_boulevard¶
Defined in File peak_profile.hpp
Function Documentation¶
-
template<meta::eval_node_range R, typename BlockOfFn>
RichSchedule sequant::eval::compute_dag_boulevard(R const &forest, dryrun::CostModel const &cm, BlockOfFn const &block_of)¶ Linearize an eval
forestinto aRichScheduleof rich value cells over a single post-order static-point timeline.Stamps the lifetime masks first (so
home_scope, which readssliced_modes, is populated), then walks every tree in post-order (children before parent), assigning each visited node — leaves included — a monotone static point. On descent each node’snode_slice_mask()loops are pushed onto an enclosing-batch-context stack visible to that node’s children, and popped before the node itself is recorded: a node’s own realized loop encloses its operands but not its own (loop-result) value.Nodes are then grouped by
hash_value()— the same value identityCacheManageruses — into oneValueCellper distinct value. Under perfect CSE the group’sfirst_useis its single (earliest) production point and itslast_useis the latest structural consumer (the max parent point over the group; a root with no parent contributes its own point).home_depth,carried, andhome_modesare read off the first occurrence (the seed-residency meet is identical across occurrences of a hoisted value);enclosing_modesaccumulates across every occurrence, since a demoted mode may only enclose the value at some of its occurrences.block_ofis anyIndex -> std::size_tcallable giving the block (sliced) element count for a mode; only used while walking (to size the enclosing-batch-context entries pushed on descent) —cmis accepted for signature symmetry withdetail::cell_footprintbut not otherwise used here (no footprint is computed).