← all workloads

loop_unroll

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

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.

loop_unroll — phase composition vs N (v2026.13.1, median ms) loop_unroll 26.8× over N 75→600 0.0 610 1221 75 150 300 600 N loop_unroll — parseTranslationUnit loop_unroll — SemanticChecking loop_unroll — generateIR loop_unroll — frontEndExecute (self) loop_unroll — specializeModule loop_unroll — simplifyIR loop_unroll — linkIR loop_unroll — unrollLoopsInModule loop_unroll — legalizeResourceTypes loop_unroll — legalizeExistentialTypeLayout loop_unroll — performMandatoryEarlyInlining loop_unroll — performForceInlining loop_unroll — generateOutput (self) loop_unroll — 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×
75–600111.710.9874211304.39×

Growth attribution (N=75 → N=600)

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.

buckett@N=75t@N=600Δ msshare× lin∝Nk
specializeModule9445+43640%4.37×1.86
unrollLoopsInModule7408+40137%4.86×1.95
simplifyIR585+807%2.17×1.39
legalizeExistentialTypeLayout179+787%5.56×2.01
legalizeResourceTypes178+777%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).

Sweep numbers (median ms)

NcompileInnerunrollLoopsInModulesimplifyIR
754286
150883013
30025711735
6001130575120