diff options
author | Thomas Lively <tlively@google.com> | 2024-08-29 15:08:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 15:08:00 -0700 |
commit | 871ff0d4f910b565c15f82e8f3c9aa769b01d286 (patch) | |
tree | be231d3804086dbb4a335a2fe0334475a5937130 /test/spec | |
parent | b63aeadb09a4450f55041dfb3fb7260807e91dfc (diff) | |
download | binaryen-871ff0d4f910b565c15f82e8f3c9aa769b01d286.tar.gz binaryen-871ff0d4f910b565c15f82e8f3c9aa769b01d286.tar.bz2 binaryen-871ff0d4f910b565c15f82e8f3c9aa769b01d286.zip |
Simplify ReorderGlobals using new topological sort utils (#6885)
Use the new TopologicalSort and MinTopologicalSortOf utilities instead
of the old CRTP topological sort utility and a bespoke heap-based
topological sort in ReorderGlobals. Since there is no longer a heap to
pop from, the direction of the custom comparator is now much more
intuitive.
Further simplify the code by switching from tracking the new order of
globals using a sequence of new indices to tracking the order using a
sequence of old indices.
This change also makes the pass about 20% faster on a large real-world
module.
Diffstat (limited to 'test/spec')
0 files changed, 0 insertions, 0 deletions