Port the sparse live-register walk from VIctory and Darner #147
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!147
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-147"
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?
@yyc160 on GitHub · 2026-12-05 19:43 UTC · original
yyc160:perf/iterate-live-registers→main· +29 −4 · 1 files · 2 commits · merged 2026-12-05 20:42 UTCPort slatefield's sparse live-register iterator from VIctory (original project change #1833), also present in Darner's shader IR. Credit for the algorithm belongs to its original contributor.
The SSA builder enumerates live register sets per block. Walk the set bits in each word instead of probing all 513 possible register indices. The order is unchanged, including the SCC boundary; bits past the last register are not emitted. No changes to decoding, cache format, or shader semantics. As with other translator-source changes the translator cache key changes once.
Checks:
cargo test --release --locked -p larp-shader --lib. The regression compares sparse, boundary and padded dense sets against the full-scan reference. A separate CPU-pinned ABBA comparison of completeir::buildcalls used generated branching programs, not game shaders. Median of 14 runs per binary: 513 blocks, 1.794 -> 1.685 ms; 2049 blocks, 7.253 -> 7.189 ms. The complete IR fingerprints matched for both. The second timing difference is small relative to run-to-run variation. No claim about gameplay FPS.AI-assisted by GPT-6.2 Astra.
f209756' into perf/iterate-live-registers 39420b3a2f