From a8da89653981bb37565981afc69104f918fea64a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 11 Oct 2017 10:13:32 -0700 Subject: fix ssaify bug where we failed to update the location of values as we moved them around, causing us to zero out the wrong thing in another place and ensuing hilarity (#1212) --- src/ast/LocalGraph.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ast/LocalGraph.cpp') diff --git a/src/ast/LocalGraph.cpp b/src/ast/LocalGraph.cpp index c997eff1b..0d36fec84 100644 --- a/src/ast/LocalGraph.cpp +++ b/src/ast/LocalGraph.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -24,6 +25,18 @@ namespace wasm { LocalGraph::LocalGraph(Function* func, Module* module) { walkFunctionInModule(func, module); + +#ifdef LOCAL_GRAPH_DEBUG + std::cout << "LocalGraph::dump\n"; + for (auto& pair : getSetses) { + auto* get = pair.first; + auto& sets = pair.second; + std::cout << "GET\n" << get << " is influenced by\n"; + for (auto* set : sets) { + std::cout << set << '\n'; + } + } +#endif } void LocalGraph::computeInfluences() { -- cgit v1.2.3