mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
ssa_rewrite_pass: use proper maps
This commit is contained in:
parent
3e4029b238
commit
dad0d076ee
1 changed files with 5 additions and 6 deletions
|
@ -14,12 +14,12 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <map>
|
||||||
#include <span>
|
#include <span>
|
||||||
|
#include <unordered_map>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/container/flat_map.hpp>
|
|
||||||
|
|
||||||
#include "shader_recompiler/frontend/ir/basic_block.h"
|
#include "shader_recompiler/frontend/ir/basic_block.h"
|
||||||
#include "shader_recompiler/frontend/ir/opcodes.h"
|
#include "shader_recompiler/frontend/ir/opcodes.h"
|
||||||
#include "shader_recompiler/frontend/ir/pred.h"
|
#include "shader_recompiler/frontend/ir/pred.h"
|
||||||
|
@ -52,7 +52,7 @@ struct IndirectBranchVariable {
|
||||||
|
|
||||||
using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag,
|
using Variant = std::variant<IR::Reg, IR::Pred, ZeroFlagTag, SignFlagTag, CarryFlagTag,
|
||||||
OverflowFlagTag, GotoVariable, IndirectBranchVariable>;
|
OverflowFlagTag, GotoVariable, IndirectBranchVariable>;
|
||||||
using ValueMap = boost::container::flat_map<IR::Block*, IR::Value>;
|
using ValueMap = std::unordered_map<IR::Block*, IR::Value>;
|
||||||
|
|
||||||
struct DefTable {
|
struct DefTable {
|
||||||
const IR::Value& Def(IR::Block* block, IR::Reg variable) {
|
const IR::Value& Def(IR::Block* block, IR::Reg variable) {
|
||||||
|
@ -112,7 +112,7 @@ struct DefTable {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<ValueMap, IR::NUM_USER_PREDS> preds;
|
std::array<ValueMap, IR::NUM_USER_PREDS> preds;
|
||||||
boost::container::flat_map<u32, ValueMap> goto_vars;
|
std::unordered_map<u32, ValueMap> goto_vars;
|
||||||
ValueMap indirect_branch_var;
|
ValueMap indirect_branch_var;
|
||||||
ValueMap zero_flag;
|
ValueMap zero_flag;
|
||||||
ValueMap sign_flag;
|
ValueMap sign_flag;
|
||||||
|
@ -295,8 +295,7 @@ private:
|
||||||
return same;
|
return same;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::container::flat_map<IR::Block*, boost::container::flat_map<Variant, IR::Inst*>>
|
std::unordered_map<IR::Block*, std::map<Variant, IR::Inst*>> incomplete_phis;
|
||||||
incomplete_phis;
|
|
||||||
DefTable current_def;
|
DefTable current_def;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue