diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-15 00:15:42 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:22 +0200 |
commit | cbfb7d182a4e90e4e263696d1fca35e47d3eabb4 (patch) | |
tree | a8d384aa0daefdfafd9b61330e06b1cf7ac40ea6 /src/shader_recompiler/ir_opt/passes.h | |
parent | shader: Misc fixes (diff) | |
download | yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar.gz yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar.bz2 yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar.lz yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar.xz yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.tar.zst yuzu-cbfb7d182a4e90e4e263696d1fca35e47d3eabb4.zip |
Diffstat (limited to 'src/shader_recompiler/ir_opt/passes.h')
-rw-r--r-- | src/shader_recompiler/ir_opt/passes.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shader_recompiler/ir_opt/passes.h b/src/shader_recompiler/ir_opt/passes.h index 578a24d89..30eb31588 100644 --- a/src/shader_recompiler/ir_opt/passes.h +++ b/src/shader_recompiler/ir_opt/passes.h @@ -4,14 +4,16 @@ #pragma once +#include <span> + #include "shader_recompiler/frontend/ir/basic_block.h" #include "shader_recompiler/frontend/ir/function.h" namespace Shader::Optimization { template <typename Func> -void Invoke(Func&& func, IR::Function& function) { - for (const auto& block : function.blocks) { +void PostOrderInvoke(Func&& func, IR::Function& function) { + for (const auto& block : function.post_order_blocks) { func(*block); } } @@ -20,7 +22,7 @@ void ConstantPropagationPass(IR::Block& block); void DeadCodeEliminationPass(IR::Block& block); void GlobalMemoryToStorageBufferPass(IR::Block& block); void IdentityRemovalPass(IR::Function& function); -void SsaRewritePass(IR::Function& function); +void SsaRewritePass(std::span<IR::Block* const> post_order_blocks); void VerificationPass(const IR::Function& function); } // namespace Shader::Optimization |