diff options
Diffstat (limited to 'src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp')
-rw-r--r-- | src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp b/src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp index bbaa412f6..132b2012a 100644 --- a/src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp +++ b/src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp @@ -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(); } |