diff options
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp index 052f1609b..7da4d50ef 100644 --- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp +++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <tuple> | 6 | #include <tuple> |
| 7 | #include <type_traits> | 7 | #include <type_traits> |
| 8 | #include <ranges> | ||
| 8 | 9 | ||
| 9 | #include "common/bit_cast.h" | 10 | #include "common/bit_cast.h" |
| 10 | #include "common/bit_util.h" | 11 | #include "common/bit_util.h" |
| @@ -424,7 +425,7 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { | |||
| 424 | } // Anonymous namespace | 425 | } // Anonymous namespace |
| 425 | 426 | ||
| 426 | void ConstantPropagationPass(IR::Program& program) { | 427 | void ConstantPropagationPass(IR::Program& program) { |
| 427 | for (IR::Block* const block : program.post_order_blocks) { | 428 | for (IR::Block* const block : program.post_order_blocks | std::views::reverse) { |
| 428 | for (IR::Inst& inst : block->Instructions()) { | 429 | for (IR::Inst& inst : block->Instructions()) { |
| 429 | ConstantPropagation(*block, inst); | 430 | ConstantPropagation(*block, inst); |
| 430 | } | 431 | } |