diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp index 06fde0017..221454b99 100644 --- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | |||
| @@ -313,9 +313,7 @@ bool NeedsLift(Node goto_stmt, Node label_stmt) noexcept { | |||
| 313 | 313 | ||
| 314 | class GotoPass { | 314 | class GotoPass { |
| 315 | public: | 315 | public: |
| 316 | explicit GotoPass(Flow::CFG& cfg, ObjectPool<IR::Inst>& inst_pool_, | 316 | explicit GotoPass(Flow::CFG& cfg, ObjectPool<Statement>& stmt_pool) : pool{stmt_pool} { |
| 317 | ObjectPool<IR::Block>& block_pool_, ObjectPool<Statement>& stmt_pool) | ||
| 318 | : inst_pool{inst_pool_}, block_pool{block_pool_}, pool{stmt_pool} { | ||
| 319 | std::vector gotos{BuildTree(cfg)}; | 317 | std::vector gotos{BuildTree(cfg)}; |
| 320 | for (const Node& goto_stmt : gotos | std::views::reverse) { | 318 | for (const Node& goto_stmt : gotos | std::views::reverse) { |
| 321 | RemoveGoto(goto_stmt); | 319 | RemoveGoto(goto_stmt); |
| @@ -616,8 +614,6 @@ private: | |||
| 616 | return parent_tree.insert(std::next(loop), *new_goto); | 614 | return parent_tree.insert(std::next(loop), *new_goto); |
| 617 | } | 615 | } |
| 618 | 616 | ||
| 619 | ObjectPool<IR::Inst>& inst_pool; | ||
| 620 | ObjectPool<IR::Block>& block_pool; | ||
| 621 | ObjectPool<Statement>& pool; | 617 | ObjectPool<Statement>& pool; |
| 622 | Statement root_stmt{FunctionTag{}}; | 618 | Statement root_stmt{FunctionTag{}}; |
| 623 | }; | 619 | }; |
| @@ -864,7 +860,6 @@ private: | |||
| 864 | ObjectPool<IR::Block>& block_pool; | 860 | ObjectPool<IR::Block>& block_pool; |
| 865 | Environment& env; | 861 | Environment& env; |
| 866 | IR::AbstractSyntaxList& syntax_list; | 862 | IR::AbstractSyntaxList& syntax_list; |
| 867 | u32 loop_id{}; | ||
| 868 | 863 | ||
| 869 | // TODO: C++20 Remove this when all compilers support constexpr std::vector | 864 | // TODO: C++20 Remove this when all compilers support constexpr std::vector |
| 870 | #if __cpp_lib_constexpr_vector >= 201907 | 865 | #if __cpp_lib_constexpr_vector >= 201907 |
| @@ -878,7 +873,7 @@ private: | |||
| 878 | IR::AbstractSyntaxList BuildASL(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Block>& block_pool, | 873 | IR::AbstractSyntaxList BuildASL(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Block>& block_pool, |
| 879 | Environment& env, Flow::CFG& cfg) { | 874 | Environment& env, Flow::CFG& cfg) { |
| 880 | ObjectPool<Statement> stmt_pool{64}; | 875 | ObjectPool<Statement> stmt_pool{64}; |
| 881 | GotoPass goto_pass{cfg, inst_pool, block_pool, stmt_pool}; | 876 | GotoPass goto_pass{cfg, stmt_pool}; |
| 882 | Statement& root{goto_pass.RootStatement()}; | 877 | Statement& root{goto_pass.RootStatement()}; |
| 883 | IR::AbstractSyntaxList syntax_list; | 878 | IR::AbstractSyntaxList syntax_list; |
| 884 | TranslatePass{inst_pool, block_pool, stmt_pool, env, root, syntax_list}; | 879 | TranslatePass{inst_pool, block_pool, stmt_pool, env, root, syntax_list}; |