summaryrefslogtreecommitdiff
path: root/src/passes/Heap2Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Heap2Local.cpp')
-rw-r--r--src/passes/Heap2Local.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/passes/Heap2Local.cpp b/src/passes/Heap2Local.cpp
index fc3c18db0..19259e864 100644
--- a/src/passes/Heap2Local.cpp
+++ b/src/passes/Heap2Local.cpp
@@ -506,10 +506,9 @@ struct Heap2LocalOptimizer {
// look at something that another allocation reached, which would be in a
// different call to this function and use a different queue (any overlap
// between calls would prove non-exclusivity).
- if (seen.count(parent)) {
+ if (!seen.emplace(parent).second) {
return false;
}
- seen.insert(parent);
switch (getParentChildInteraction(parent, child)) {
case ParentChildInteraction::Escapes: {