A force-unrolled loop of `n` iterations. Stresses loop unrolling (unrollLoopsInModule) and the downstream SSA simplify on the unrolled body. Scaling null: the unrolled output is O(n), so ideal cost is linear in n (linear in output size).
bucket: loop_unroll · 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× |
|---|---|---|---|---|---|---|
| 75–600 | 11 | 1.71 | 0.987 | 42 | 1130 | 4.39× |
compileInner grows by 1088 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=75 | t@N=600 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| specializeModule | 9 | 445 | +436 | 40% | 4.37× | 1.86 |
| unrollLoopsInModule | 7 | 408 | +401 | 37% | 4.86× | 1.95 |
| simplifyIR | 5 | 85 | +80 | 7% | 2.17× | 1.39 |
| legalizeExistentialTypeLayout | 1 | 79 | +78 | 7% | 5.56× | 2.01 |
| legalizeResourceTypes | 1 | 78 | +77 | 7% | 5.57× | 2.00 |
Near-constant (≤2% of growth each): generateOutput (self) (5→21 ms), SemanticChecking (9→9 ms), generateIR (4→4 ms), frontEndExecute (self) (1→1 ms), performForceInlining (0→0 ms), linkIR (0→0 ms), performMandatoryEarlyInlining (0→0 ms), parseTranslationUnit (0→0 ms), compileInner (self) (0→0 ms).
| N | compileInner | unrollLoopsInModule | simplifyIR |
|---|---|---|---|
| 75 | 42 | 8 | 6 |
| 150 | 88 | 30 | 13 |
| 300 | 257 | 117 | 35 |
| 600 | 1130 | 575 | 120 |