A single entry point with n stacked control-flow blocks — nested if/else, a bounded inner loop with break/continue, and a switch — all mutating a small set of carried locals (a, b, c, d). Re-assigning the same locals across many branches and loop back-edges is what forces SSA construction to insert phi nodes and what the CFG simplifier (constructSSA, inside simplifyIR) must chew through. Isolates the SSA/CFG axis that complexity_ladder only touches as one of several mixed dimensions; nothing else stresses it alone. Scales by breadth = number of control-flow blocks, so basic-block and phi counts grow with n. Scaling null: n scales control-flow blocks; ideal SSA construction is near-linear in block count.
bucket: control_flow · 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× |
|---|---|---|---|---|---|---|
| 60–480 | 14 | 1.42 | 0.996 | 106 | 1769 | 2.99× |
compileInner grows by 1663 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=60 | t@N=480 | Δ ms | share | × lin | ∝Nk |
|---|---|---|---|---|---|---|
| generateOutput (self) | 32 | 633 | +601 | 36% | 2.19× | 1.47 |
| linkAndOptimizeIR (self) | 14 | 542 | +528 | 32% | 3.37× | 1.79 |
| simplifyIR | 17 | 164 | +148 | 9% | 1.21× | 1.11 |
| generateIR | 12 | 158 | +146 | 9% | 1.83× | 1.28 |
| performMandatoryEarlyInlining | 1 | 80 | +79 | 5% | 6.09× | 2.02 |
Also growing (below top-5): SemanticChecking (+66 ms, 4%).
Near-constant (≤2% of growth each): specializeModule (5→37 ms), compileInner (self) (0→29 ms), legalizeExistentialTypeLayout (2→13 ms), legalizeResourceTypes (2→13 ms), linkIR (1→6 ms), parseTranslationUnit (1→5 ms), performForceInlining (0→2 ms), unrollLoopsInModule (0→1 ms), frontEndExecute (self) (0→0 ms).
| N | compileInner | simplifyIR | frontEndExecute |
|---|---|---|---|
| 60 | 106 | 17 | 31 |
| 120 | 229 | 34 | 50 |
| 240 | 592 | 73 | 99 |
| 480 | 1769 | 164 | 248 |