diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/ir_opt/passes.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/shader_recompiler/ir_opt/passes.h b/src/shader_recompiler/ir_opt/passes.h index 3b7e7306b..5c1fc166c 100644 --- a/src/shader_recompiler/ir_opt/passes.h +++ b/src/shader_recompiler/ir_opt/passes.h | |||
| @@ -8,26 +8,18 @@ | |||
| 8 | 8 | ||
| 9 | #include "shader_recompiler/environment.h" | 9 | #include "shader_recompiler/environment.h" |
| 10 | #include "shader_recompiler/frontend/ir/basic_block.h" | 10 | #include "shader_recompiler/frontend/ir/basic_block.h" |
| 11 | #include "shader_recompiler/frontend/ir/function.h" | ||
| 12 | #include "shader_recompiler/frontend/ir/program.h" | 11 | #include "shader_recompiler/frontend/ir/program.h" |
| 13 | 12 | ||
| 14 | namespace Shader::Optimization { | 13 | namespace Shader::Optimization { |
| 15 | 14 | ||
| 16 | template <typename Func> | ||
| 17 | void PostOrderInvoke(Func&& func, IR::Function& function) { | ||
| 18 | for (const auto& block : function.post_order_blocks) { | ||
| 19 | func(*block); | ||
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | void CollectShaderInfoPass(IR::Program& program); | 15 | void CollectShaderInfoPass(IR::Program& program); |
| 24 | void ConstantPropagationPass(IR::Block& block); | 16 | void ConstantPropagationPass(IR::Program& program); |
| 25 | void DeadCodeEliminationPass(IR::Block& block); | 17 | void DeadCodeEliminationPass(IR::Program& program); |
| 26 | void GlobalMemoryToStorageBufferPass(IR::Program& program); | 18 | void GlobalMemoryToStorageBufferPass(IR::Program& program); |
| 27 | void IdentityRemovalPass(IR::Function& function); | 19 | void IdentityRemovalPass(IR::Program& program); |
| 28 | void LowerFp16ToFp32(IR::Program& program); | 20 | void LowerFp16ToFp32(IR::Program& program); |
| 29 | void SsaRewritePass(std::span<IR::Block* const> post_order_blocks); | 21 | void SsaRewritePass(IR::Program& program); |
| 30 | void TexturePass(Environment& env, IR::Program& program); | 22 | void TexturePass(Environment& env, IR::Program& program); |
| 31 | void VerificationPass(const IR::Function& function); | 23 | void VerificationPass(const IR::Program& program); |
| 32 | 24 | ||
| 33 | } // namespace Shader::Optimization | 25 | } // namespace Shader::Optimization |