mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-22 05:46:34 +01:00
operand: Implement operand hashing and use hashed set for declarations
Instead of manually searching each element in the declarations vector, use an unordered_set to emplace new declarations avoiding repetition.
This commit is contained in:
parent
f7c4b07a7e
commit
1e665afa36
10 changed files with 66 additions and 13 deletions
|
|
@ -933,7 +933,8 @@ private:
|
|||
std::vector<std::unique_ptr<Op>> execution_modes;
|
||||
std::vector<std::unique_ptr<Op>> debug;
|
||||
std::vector<std::unique_ptr<Op>> annotations;
|
||||
std::vector<std::unique_ptr<Op>> declarations;
|
||||
std::unordered_set<std::unique_ptr<Op>> declarations;
|
||||
std::vector<Id> sorted_declarations;
|
||||
|
||||
std::vector<Id> global_variables;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue