Struct CacheManager::BuildRecord

Nested Relationships

This struct is a nested type of Template Class CacheManager.

Struct Documentation

struct BuildRecord

Diagnostic (dry-run costing): per-distinct-value build tally for the avoidable-recompute rollup, keyed by the same node identity the cache dedups on (TreeNodeHasher + TreeNodeEqualityComparator = topological hash bin + Bliss connectivity 3-way cmp + recursive child compare), so two topologically-distinct nodes sharing a 64-bit hash are not folded and per-block / alpha-renamed builds of one value are folded.

Recompute is measured with actual replay FLOPs, deduped at the (value, slice) granularity — not against a build-once “full extent” denominator, which is ill-defined when slicing is non-uniform. slices maps a slice signature — the enclosing batch context projected onto the modes this value actually carries (empty for a value invariant to every live loop) — to that slice’s {build count, one build’s actual cost}. Then: total = sum over slices of builds*cost (== the replay’s dryrun sum) build-once = sum over slices of cost (each distinct slice once) avoidable = sum over slices of (builds-1)*cost. A value tiled over distinct slices (different blocks) has builds==1 per slice -> 0 avoidable (tiling is not recompute, even if the blocks are unequal). A value rebuilt at the same slice — e.g. a node invariant to an enclosing loop, whose projected signature is identical every block — has builds>1 at one slice -> (builds-1)*cost avoidable. Costs need not be uniform across slices; each slice carries its own realized cost.

Public Members

std::size_t count = 0
double flops = 0
double exec = 0