← all workloads

emit_hlsl

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_source  ·  mode: target  ·  flags: -target hlsl -entry computeMain

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.

emit_hlsl — phase composition vs N (v2026.5, median ms) emit_hlsl 28.0× over N 100→800 0.0 1010 2020 100 200 400 800 N emit_hlsl — parseTranslationUnit emit_hlsl — SemanticChecking emit_hlsl — generateIR emit_hlsl — frontEndExecute (self) emit_hlsl — specializeModule emit_hlsl — simplifyIR emit_hlsl — linkIR emit_hlsl — unrollLoopsInModule emit_hlsl — legalizeResourceTypes emit_hlsl — legalizeExistentialTypeLayout emit_hlsl — performMandatoryEarlyInlining emit_hlsl — performForceInlining emit_hlsl — emitEntryPointsSourceFromIR emit_hlsl — 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–80091.680.9906718713.91×

Growth attribution (N=100 → N=800)

compileInner grows by 1804 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
emitEntryPointsSourceFromIR18875+85747%4.49×1.88
legalizeResourceTypes7427+42023%5.27×2.02
legalizeExistentialTypeLayout7420+41323%5.11×2.01
SemanticChecking27107+794%0.72×0.72

Near-constant (≤2% of growth each): generateIR (4→17 ms), specializeModule (2→11 ms), simplifyIR (1→7 ms), compileInner (self) (0→3 ms), parseTranslationUnit (0→2 ms), linkIR (1→2 ms), performMandatoryEarlyInlining (0→0 ms), frontEndExecute (self) (0→0 ms), performForceInlining (0→0 ms), unrollLoopsInModule (0→0 ms).

Sweep numbers (median ms)

NcompileInneremitEntryPointsSourceFromIRgenerateOutput
100673434
200147102102
400478404404
800187117411742