Shaders: worklist register liveness with 96 independent synthetic CFG… #1844
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1846"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T23:19:02Z.
Replace repeated full-CFG register liveness sweeps with a predecessor worklist. Includes 96 independent synthetic regression fixtures across 12 graph families. Old sweep, new worklist and path-search models agreed on all 4,192 cases. Synthetic block visits decreased by 47.88%. 100 files, 1,965 additions, no new dependencies. Native Rust tests and real shader benchmarks pending. No proprietary game data. AI-assisted (ChatGPT).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:52:17Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 214 passed, 0 failed. GPU execution tests are #[cfg(all(test, windows))] and run only on Windows.Worklist register liveness with 96 independent synthetic tests: 214 macOS tests green (biggest suite in the repo now) — strong verification of the new liveness worklist.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T23:23:04Z.
NVIDIA run: RTX 3070 8 GB, driver 616.56, plus WARP, Windows 11, debug,
5d4445d(onmain70564ae).cargo test -p victory-shader --locked: 302 passed, 3 failed, 2 ignored. The 96 new CFG cases pass, and the 3 failures are #1744's NVIDIA heap-cap failures onmain.AI-assisted (Claude Code). Synthetic tests only.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:37:10Z.
Automated triage for the maintainers.
Merge candidate. The head (
fc589db) hasn't changed since the last review.solve_livenessincrates/victory-shader/src/ir.rsreplaces the round-robin fixed point with a predecessor worklist and keeps the transfer function (uses | out & !defs).ir/liveness_tests.rschecks it against a separate path-to-first-use oracle on generated CFGs. The diff is two files and 181 added lines.On your reply: thanks for the measurements. A 1.9x to 2.7x speed-up of the solver on 2,048-block synthetic CFGs, with identical live sets, supports the change. A timing on a large real shader would still be the stronger number, but it doesn't block this.
CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-25T20:42:14Z.
Local performance validation
Ryzen 5 3600X / RX 5700 XT / Windows 10
Rust 1.98.1
2048-block synthetic CFG results:
All 12 configurations were faster and produced
identical live-in and live-out sets.
Maximum execution time reduction: 62.4%.
PR tested:
fc589dbBenchmark source:
github.com/VlREX/VIREX@1627eaa3bbSeven alternating-order samples per configuration.
Synthetic solver benchmark, not end-to-end shader
translation or game FPS.
AI-assisted development (ChatGPT).
Native local measurements.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:24:07Z.
Review: APPROVED
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):cargo test --locked -p victory-shader --lib ir::— 11 passed, 0 failed (includingduplicate_edges_and_unreachable_predecessorsandgenerated_control_flow_matches_path_oracle, which checks 192 synthetic CFGs againstreaches_use)cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features) — 0 warningscargo xtask policy— ok (192 files ok)Review notes
solve_livenessand the prior round-robin loop:link()keepspredssynced withExit::successors()(including aftersplit_irreducible),live_out[b]is stored on every pop even whenlive_in[b]does not change,queued[b]is cleared before evaluation so self-loops re-enqueue cleanly, and unreachable blocks stay zeroed under!reachable[p].rustfmt --edition 2024 --checkflags threeExit::Branchstruct literals incrates/victory-shader/src/ir/liveness_tests.rs(around lines 93, 123, and 129).Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-27T00:08:29Z.
Review: APPROVED
LGTM — verified on Windows against
origin/main(63bcca4).cargo test -p victory-shader --lib ir:: -- --test-threads=1: all passed.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.