← all workloads

ir_builder

One enormous straight-line function: `n` trivial integer SSA ops, almost no semantic work. Stresses IR instruction construction / dedup / hash-cons and the SSA simplifier (the shared IRBuilder layer the v2026.7 release regressed). Scaling null: n scales straight-line op count; ideal cost is O(n) with amortized-constant hash-consing, so super-linear sweep growth means IR dedup/use-list structures scale worse than the code.

bucket: ir_infra  ·  mode: target  ·  flags: -target spirv -emit-spirv-directly

Phase composition vs N (stacked sub-counters)

compileInner split into phase buckets (named leaves + (self) residuals) stacked across the sweep sizes — the top edge is compileInner, so you can see which phase drives the scaling.

ir_builder — phase composition vs N (v2026.12, median ms) ir_builder 30.1× over N 500→4000 0.0 716 1432 500 1000 2000 4000 N ir_builder — parseTranslationUnit ir_builder — SemanticChecking ir_builder — generateIR ir_builder — frontEndExecute (self) ir_builder — specializeModule ir_builder — simplifyIR ir_builder — linkIR ir_builder — unrollLoopsInModule ir_builder — legalizeResourceTypes ir_builder — legalizeExistentialTypeLayout ir_builder — performMandatoryEarlyInlining ir_builder — performForceInlining ir_builder — linkAndOptimizeIR (self) ir_builder — generateOutput (self) ir_builder — compileInner (self) phase buckets parseTranslationUnit SemanticChecking generateIR frontEndExecute (self) specializeModule simplifyIR linkIR unrollLoopsInModule legalizeResourceTypes legalizeExistentialTypeLayout performMandatoryEarlyInlining performForceInlining linkAndOptimizeIR (self) emitEntryPointsSourceFromIR generateOutput (self) compileInner (self)

Scaling analysis

floor-subtracted power-law fit (t − floor) = a·Nk; floor = the minimal workload (fixed per-compile cost), k the global exponent, top-2× the local high-end doubling ratio.

N rangefloor (ms)k (work)fit R²t(Nmin)t(Nmax)top-2×
500–4000141.820.9984413263.82×

Growth attribution (N=500 → N=4000)

compileInner grows by 1282 ms across the sweep; the mutually-exclusive phase buckets below partition that growth exactly (no nested-timer double counting). × lin is the same metric as the top-level panels, per bucket: the end point vs a linear expectation anchored to the bucket's share of the minimal floor and fitted on the low-N half — 1.0 = grew exactly linearly, >1 bends up. The super-linearity lives where × lin (and k) are red.

buckett@N=500t@N=4000Δ msshare× lin∝Nk
generateOutput (self)10327+31825%3.79×1.82
linkAndOptimizeIR (self)7322+31425%4.07×1.90
legalizeExistentialTypeLayout6316+31124%4.38×1.93
legalizeResourceTypes6312+30624%4.31×1.93

Near-constant (≤2% of growth each): SemanticChecking (8→15 ms), simplifyIR (2→11 ms), generateIR (2→8 ms), specializeModule (2→7 ms), compileInner (self) (0→2 ms), linkIR (1→2 ms), parseTranslationUnit (0→2 ms), frontEndExecute (self) (0→0 ms), performForceInlining (0→0 ms), performMandatoryEarlyInlining (0→0 ms), unrollLoopsInModule (0→0 ms).

Sweep numbers (median ms)

NcompileInnergenerateIRsimplifyIR
5004422
100010633
200034746
40001326811