diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-21 09:58:23 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:28 +0200 |
commit | 23182fa59c45a88b706022c1373e307ba4636cca (patch) | |
tree | d67509fa5ca2370bf4cf88aa69aaf36cdf58d660 /src/shader_recompiler/ir_opt | |
parent | cmake: Link to common in shader_recompiler (diff) | |
download | yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar.gz yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar.bz2 yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar.lz yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar.xz yuzu-23182fa59c45a88b706022c1373e307ba4636cca.tar.zst yuzu-23182fa59c45a88b706022c1373e307ba4636cca.zip |
Diffstat (limited to 'src/shader_recompiler/ir_opt')
-rw-r--r-- | src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp index fe86a164b..3bab742e7 100644 --- a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp +++ b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp @@ -195,7 +195,7 @@ public: case Status::Start: { if (const IR::Value& def = current_def.Def(block, variable); !def.IsEmpty()) { stack.back().result = def; - } else if (!sealed_blocks.contains(block)) { + } else if (!block->IsSsaSealed()) { // Incomplete CFG IR::Inst* phi{&*block->PrependNewInst(block->begin(), IR::Opcode::Phi)}; phi->SetFlags(IR::TypeOf(UndefOpcode(variable))); @@ -251,7 +251,7 @@ public: std::visit([&](auto& variable) { AddPhiOperands(variable, *phi, block); }, variant); } } - sealed_blocks.insert(block); + block->SsaSeal(); } private: @@ -297,7 +297,6 @@ private: return same; } - boost::container::flat_set<IR::Block*> sealed_blocks; boost::container::flat_map<IR::Block*, boost::container::flat_map<Variant, IR::Inst*>> incomplete_phis; DefTable current_def; |