Skip to content

Commit 491f1ff

Browse files
committed
Use SmallSet in EffectsAnalyzer
Signed-off-by: Squareys <squareys@googlemail.com>
1 parent 7725c70 commit 491f1ff

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/ir/effects.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "ir/intrinsics.h"
2121
#include "pass.h"
22+
#include "support/small_set.h"
2223
#include "wasm-traversal.h"
2324

2425
namespace wasm {
@@ -91,10 +92,10 @@ class EffectAnalyzer {
9192
// of control flow proceeding normally).
9293
bool branchesOut = false;
9394
bool calls = false;
94-
std::set<Index> localsRead;
95-
std::set<Index> localsWritten;
96-
std::set<Name> mutableGlobalsRead;
97-
std::set<Name> globalsWritten;
95+
SmallSet<Index, 1> localsRead;
96+
SmallSet<Index, 1> localsWritten;
97+
SmallSet<Name, 1> mutableGlobalsRead;
98+
SmallSet<Name, 1> globalsWritten;
9899
bool readsMemory = false;
99100
bool writesMemory = false;
100101
bool readsTable = false;
@@ -343,8 +344,8 @@ class EffectAnalyzer {
343344
return hasAnything();
344345
}
345346

346-
std::set<Name> breakTargets;
347-
std::set<Name> delegateTargets;
347+
SmallSet<Name, 1> breakTargets;
348+
SmallSet<Name, 1> delegateTargets;
348349

349350
private:
350351
struct InternalAnalyzer

0 commit comments

Comments
 (0)