summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/constant_propagation_pass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
index 3c72203ad..8dd6d6c2c 100644
--- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
+++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@@ -3,7 +3,6 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm> 5#include <algorithm>
6#include <ranges>
7#include <tuple> 6#include <tuple>
8#include <type_traits> 7#include <type_traits>
9 8
@@ -599,7 +598,9 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
599} // Anonymous namespace 598} // Anonymous namespace
600 599
601void ConstantPropagationPass(IR::Program& program) { 600void ConstantPropagationPass(IR::Program& program) {
602 for (IR::Block* const block : program.post_order_blocks | std::views::reverse) { 601 const auto end{program.post_order_blocks.rend()};
602 for (auto it = program.post_order_blocks.rbegin(); it != end; ++it) {
603 IR::Block* const block{*it};
603 for (IR::Inst& inst : block->Instructions()) { 604 for (IR::Inst& inst : block->Instructions()) {
604 ConstantPropagation(*block, inst); 605 ConstantPropagation(*block, inst);
605 } 606 }