aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-14 03:41:05 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:23 -0400
commit71f96fa6366dc6dd306a953bca1b958fb32bc55a (patch)
tree12e13f9502e4b9510446c967a831e5d4bacb729e /src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
parentb9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff (diff)
shader: Implement CAL inlining function calls
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/constant_propagation_pass.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
index 7ba9ebe9bb..a39db2bf12 100644
--- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
+++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@@ -371,9 +371,11 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
}
} // Anonymous namespace
-void ConstantPropagationPass(IR::Block& block) {
- for (IR::Inst& inst : block) {
- ConstantPropagation(block, inst);
+void ConstantPropagationPass(IR::Program& program) {
+ for (IR::Block* const block : program.post_order_blocks) {
+ for (IR::Inst& inst : block->Instructions()) {
+ ConstantPropagation(*block, inst);
+ }
}
}