Skip to content

Shaders: walk predecessor live-outs once during IR renaming - #71

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/ir-liveout-walk
Nov 25, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/ir-liveout-walk

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Ports upstream Marvisak/VIctory#2520.

Summary

  • Replace repeated binary searches of predecessor live-out lists with one ordered walk while renaming IR registers and filling phi arguments.
  • Size live-out vectors before filling them.
  • Add a synthetic ir_build benchmark; no title files or GPU needed.

Measurement

Upstream median results: 128 registers / 500 divergent ifs 10.5 ms -> 7.6 ms; 128 registers / 2000 divergent ifs 47.2 ms -> 36.0 ms. Local benchmark after the port: 7.66 ms and 30.09 ms respectively.

Validation

  • cargo test -p victory-shader --lib --locked: 172 passed, 2 ignored
  • cargo bench -p victory-shader --bench ir_build --locked: pass
  • cargo fmt --all -- --check: pass
  • CARGO_FEATURE_PURE=1 RUSTFLAGS='-D warnings' cargo clippy -p victory-shader --all-targets --locked --target x86_64-pc-windows-msvc: pass
  • cargo run --locked --quiet --package xtask -- policy: pass

No real game/GPU/Proton validation is available on this VM.


Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

]);
}
for i in 0..regs {
words.push(0x4A00_0000 | (i << 9) | (i << 17)); // v_add_nc_u32 v[i], v[i], v[i]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Unintended scalar input in benchmark

program reads s0 in every final add, despite documenting two vector operands. The benchmark keeps s0 live through every branch alongside the intended VGPRs.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration
devin-ai-integration Bot merged commit 083fbe9 into main Nov 25, 2026
5 checks passed
@devin-ai-integration
devin-ai-integration Bot deleted the devin/ir-liveout-walk branch November 25, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant