diff options
Diffstat (limited to 'src/ir/LocalGraph.cpp')
-rw-r--r-- | src/ir/LocalGraph.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ir/LocalGraph.cpp b/src/ir/LocalGraph.cpp index 2fdf1e4a4..9deea9153 100644 --- a/src/ir/LocalGraph.cpp +++ b/src/ir/LocalGraph.cpp @@ -281,7 +281,18 @@ bool LocalGraph::equivalent(LocalGet* a, LocalGet* b) { } } -void LocalGraph::computeInfluences() { +void LocalGraph::computeSetInfluences() { + for (auto& pair : locations) { + auto* curr = pair.first; + if (auto* get = curr->dynCast<LocalGet>()) { + for (auto* set : getSetses[get]) { + setInfluences[set].insert(get); + } + } + } +} + +void LocalGraph::computeGetInfluences() { for (auto& pair : locations) { auto* curr = pair.first; if (auto* set = curr->dynCast<LocalSet>()) { @@ -289,11 +300,6 @@ void LocalGraph::computeInfluences() { for (auto* get : findAll.list) { getInfluences[get].insert(set); } - } else { - auto* get = curr->cast<LocalGet>(); - for (auto* set : getSetses[get]) { - setInfluences[set].insert(get); - } } } } |