summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/LocalGraph.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ir/LocalGraph.cpp b/src/ir/LocalGraph.cpp
index af3a71d1f..9bdb6765f 100644
--- a/src/ir/LocalGraph.cpp
+++ b/src/ir/LocalGraph.cpp
@@ -104,8 +104,6 @@ struct Flower : public CFGWalker<Flower, Visitor<Flower>, Info> {
};
auto numLocals = func->getNumLocals();
- std::vector<std::vector<LocalGet*>> allGets;
- allGets.resize(numLocals);
std::vector<FlowBlock*> work;
// Convert input blocks (basicBlocks) into more efficient flow blocks to
@@ -157,9 +155,14 @@ struct Flower : public CFGWalker<Flower, Visitor<Flower>, Info> {
std::cout << " last set " << val.second << '\n';
}
#endif
+
+ // Track all gets in this block, by index.
+ std::vector<std::vector<LocalGet*>> allGets(numLocals);
+
// go through the block, finding each get and adding it to its index,
// and seeing how sets affect that
auto& actions = block.actions;
+
// move towards the front, handling things as we go
for (int i = int(actions.size()) - 1; i >= 0; i--) {
auto* action = actions[i];
@@ -222,7 +225,6 @@ struct Flower : public CFGWalker<Flower, Visitor<Flower>, Info> {
}
}
}
- gets.clear();
currentIteration++;
}
}