diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-14 20:15:42 -0300 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:22 -0400 |
| commit | cbfb7d182a4e90e4e263696d1fca35e47d3eabb4 (patch) | |
| tree | a8d384aa0daefdfafd9b61330e06b1cf7ac40ea6 /src/shader_recompiler/ir_opt/dead_code_elimination_pass.cpp | |
| parent | 8af9297f0972d0aaa8306369c5d04926b886a89e (diff) | |
shader: Support SSA loops on IR
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(); } |
