diff options
Diffstat (limited to 'src/ir/possible-contents.cpp')
-rw-r--r-- | src/ir/possible-contents.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp index 7c9a4fc6b..e7e0cd4fd 100644 --- a/src/ir/possible-contents.cpp +++ b/src/ir/possible-contents.cpp @@ -1202,6 +1202,13 @@ struct InfoCollector assert(handledPops == totalPops); // Handle local.get/sets: each set must write to the proper gets. + // + // Note that we do not use LocalLocation because LocalGraph gives us more + // precise information: we generate direct links from sets to relevant gets + // rather than consider each local index a single location, which + // LocalLocation does. (LocalLocation is useful in cases where we do need a + // single location, such as when we consider what type to give the local; + // the type must be the same for all gets of that local.) LocalGraph localGraph(func, getModule()); for (auto& [get, setsForGet] : localGraph.getSetses) { @@ -2766,6 +2773,9 @@ void Flower::dump(Location location) { } else if (auto* loc = std::get_if<ParamLocation>(&location)) { std::cout << " paramloc " << loc->func->name << " : " << loc->index << '\n'; + } else if (auto* loc = std::get_if<LocalLocation>(&location)) { + std::cout << " localloc " << loc->func->name << " : " << loc->index + << '\n'; } else if (auto* loc = std::get_if<ResultLocation>(&location)) { std::cout << " resultloc $" << loc->func->name << " : " << loc->index << '\n'; |