diff options
| author | 2021-07-12 05:22:01 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:40 -0400 | |
| commit | bf2956d77ab0ad06c4b5505cc9906e51e5878274 (patch) | |
| tree | 3aae336c0dc3fe65351d5e6e312a214351e2e2fc /src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | |
| parent | glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE (diff) | |
| download | yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.gz yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.tar.xz yuzu-bf2956d77ab0ad06c4b5505cc9906e51e5878274.zip | |
shader: Avoid usage of C++20 ranges to build in clang
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | 5 |
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 | ||
| 601 | void ConstantPropagationPass(IR::Program& program) { | 600 | void 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 | } |