mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 00:47:56 -05:00
shader: Support SSA loops on IR
This commit is contained in:
@ -13,7 +13,7 @@ namespace Shader::Optimization {
|
||||
void DeadCodeEliminationPass(IR::Block& block) {
|
||||
// We iterate over the instructions in reverse order.
|
||||
// This is because removing an instruction reduces the number of uses for earlier instructions.
|
||||
for (IR::Inst& inst : std::views::reverse(block)) {
|
||||
for (IR::Inst& inst : block | std::views::reverse) {
|
||||
if (!inst.HasUses() && !inst.MayHaveSideEffects()) {
|
||||
inst.Invalidate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user