diff options
| author | 2023-07-24 13:46:53 -0400 | |
|---|---|---|
| committer | 2023-07-24 13:46:53 -0400 | |
| commit | 099295d7c6ecea79dac9da950f11e6ac742dd4ba (patch) | |
| tree | b28db9e5d4d2d9ba811e26c39bd548aa8bea37eb /src/shader_recompiler/ir_opt | |
| parent | Merge pull request #11042 from lat9nq/wayland-appimage (diff) | |
| parent | ssa_rewrite_pass: use proper maps (diff) | |
| download | yuzu-099295d7c6ecea79dac9da950f11e6ac742dd4ba.tar.gz yuzu-099295d7c6ecea79dac9da950f11e6ac742dd4ba.tar.xz yuzu-099295d7c6ecea79dac9da950f11e6ac742dd4ba.zip | |
Merge pull request #11136 from liamwhite/sp3shader
ssa_rewrite_pass: use proper maps
Diffstat (limited to 'src/shader_recompiler/ir_opt')
| -rw-r--r-- | src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp index d0b145860..07cabca43 100644 --- a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp +++ b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp | |||
| @@ -14,12 +14,12 @@ | |||
| 14 | // | 14 | // |
| 15 | 15 | ||
| 16 | #include <deque> | 16 | #include <deque> |
| 17 | #include <map> | ||
| 17 | #include <span> | 18 | #include <span> |
| 19 | #include <unordered_map> | ||
| 18 | #include <variant> | 20 | #include <variant> |
| 19 | #include <vector> | 21 | #include <vector> |
| 20 | 22 | ||
| 21 | #include <boost/container/flat_map.hpp> | ||
| 22 | |||
| 23 | #include "shader_recompiler/frontend/ir/basic_block.h" | 23 | #include "shader_recompiler/frontend/ir/basic_block.h" |
| 24 | #include "shader_recompiler/frontend/ir/opcodes.h" | 24 | #include "shader_recompiler/frontend/ir/opcodes.h" |
| 25 | #include "shader_recompiler/frontend/ir/pred.h" | 25 | #include "shader_recompiler/frontend/ir/pred.h" |
| @@ -52,7 +52,7 @@ struct IndirectBranchVariable { | |||
| 52 | 52 | ||
| 53 | using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag, | 53 | using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag, |
| 54 | OverflowFlagTag, GotoVariable, IndirectBranchVariable>; | 54 | OverflowFlagTag, GotoVariable, IndirectBranchVariable>; |
| 55 | using ValueMap = boost::container::flat_map<IR::Block*, IR::Value>; | 55 | using ValueMap = std::unordered_map<IR::Block*, IR::Value>; |
| 56 | 56 | ||
| 57 | struct DefTable { | 57 | struct DefTable { |
| 58 | const IR::Value& Def(IR::Block* block, IR::Reg variable) { | 58 | const IR::Value& Def(IR::Block* block, IR::Reg variable) { |
| @@ -112,7 +112,7 @@ struct DefTable { | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | std::array<ValueMap, IR::NUM_USER_PREDS> preds; | 114 | std::array<ValueMap, IR::NUM_USER_PREDS> preds; |
| 115 | boost::container::flat_map<u32, ValueMap> goto_vars; | 115 | std::unordered_map<u32, ValueMap> goto_vars; |
| 116 | ValueMap indirect_branch_var; | 116 | ValueMap indirect_branch_var; |
| 117 | ValueMap zero_flag; | 117 | ValueMap zero_flag; |
| 118 | ValueMap sign_flag; | 118 | ValueMap sign_flag; |
| @@ -295,8 +295,7 @@ private: | |||
| 295 | return same; | 295 | return same; |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | boost::container::flat_map<IR::Block*, boost::container::flat_map<Variant, IR::Inst*>> | 298 | std::unordered_map<IR::Block*, std::map<Variant, IR::Inst*>> incomplete_phis; |
| 299 | incomplete_phis; | ||
| 300 | DefTable current_def; | 299 | DefTable current_def; |
| 301 | }; | 300 | }; |
| 302 | 301 | ||