← all workloads

codegen_spirv

A single moderately complex shader. Compiled to multiple targets by the harness (same source, varying -target) to isolate generateOutput cost. ``n`` scales the amount of straight-line math the backend must emit. Scaling null: n scales op count and the emitted output is O(n); ideal codegen cost is O(n).

bucket: codegen  ·  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.

codegen_spirv — phase composition vs N (v2026.12, median ms) codegen_spirv 44.4× over N 100→800 0.0 2040 4080 100 200 400 800 N codegen_spirv — parseTranslationUnit codegen_spirv — SemanticChecking codegen_spirv — generateIR codegen_spirv — frontEndExecute (self) codegen_spirv — specializeModule codegen_spirv — simplifyIR codegen_spirv — linkIR codegen_spirv — unrollLoopsInModule codegen_spirv — legalizeResourceTypes codegen_spirv — legalizeExistentialTypeLayout codegen_spirv — performMandatoryEarlyInlining codegen_spirv — performForceInlining codegen_spirv — linkAndOptimizeIR (self) codegen_spirv — generateOutput (self) codegen_spirv — 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×
100–800141.910.9988537784.17×

Growth attribution (N=100 → N=800)

compileInner grows by 3693 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=100t@N=800Δ msshare× lin∝Nk
generateOutput (self)16920+90524%4.74×2.02
legalizeExistentialTypeLayout11867+85623%5.48×2.10
legalizeResourceTypes11863+85223%5.51×2.10
linkAndOptimizeIR (self)10559+54915%5.17×2.02
simplifyIR8356+3489%4.04×1.84

Also growing (below top-5): specializeModule (+92 ms, 3%).

Near-constant (≤2% of growth each): SemanticChecking (15→61 ms), generateIR (5→46 ms), linkIR (1→3 ms), parseTranslationUnit (0→2 ms), performForceInlining (0→1 ms), compileInner (self) (0→1 ms), performMandatoryEarlyInlining (0→1 ms), unrollLoopsInModule (0→0 ms), frontEndExecute (self) (1→0 ms).

Sweep numbers (median ms)

NcompileInnergenerateOutput
1008563
200241210
400906853
80037783667