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
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.
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 range | floor (ms) | k (work) | fit R² | t(Nmin) | t(Nmax) | top-2× |
|---|---|---|---|---|---|---|
| 500–4000 | 11 | 0.93 | 0.993 | 19 | 65 | 1.71× |
compileInner grows by 46 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.
| bucket | t@N=500 | t@N=4000 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| generateOutput (self) | 4 | 16 | +12 | 26% | 0.97× | 0.91 |
| linkAndOptimizeIR (self) | 2 | 9 | +7 | 16% | 1.14× | 1.09 |
| SemanticChecking | 7 | 14 | +7 | 14% | 0.86× | 0.77 |
| simplifyIR | 1 | 8 | +7 | 14% | 1.07× | 1.02 |
| generateIR | 2 | 8 | +6 | 13% | 1.07× | 1.02 |
Also growing (below top-5): specializeModule (+3 ms, 6%), parseTranslationUnit (+2 ms, 4%), linkIR (+1 ms, 3%), legalizeExistentialTypeLayout (+1 ms, 3%), legalizeResourceTypes (+1 ms, 2%).
Near-constant (≤2% of growth each): frontEndExecute (self) (1→0 ms), compileInner (self) (0→0 ms), performForceInlining (0→0 ms), performMandatoryEarlyInlining (0→0 ms).
| N | compileInner | generateIR | simplifyIR |
|---|---|---|---|
| 500 | 19 | 2 | 1 |
| 1000 | 24 | 3 | 2 |
| 2000 | 38 | 4 | 4 |
| 4000 | 65 | 8 | 8 |