diff options
author | Alon Zakai <azakai@google.com> | 2021-11-19 16:57:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 16:57:31 -0800 |
commit | 01eccfff22e0dbe806f077eec26ed43f4a85e656 (patch) | |
tree | cbf0538c0ee0bd8f813f0a634ae02820e0425132 /src/tools/fuzzing/fuzzing.cpp | |
parent | d532e3a4b02375fe85a2e81be336a181e6bdc10b (diff) | |
download | binaryen-01eccfff22e0dbe806f077eec26ed43f4a85e656.tar.gz binaryen-01eccfff22e0dbe806f077eec26ed43f4a85e656.tar.bz2 binaryen-01eccfff22e0dbe806f077eec26ed43f4a85e656.zip |
[Wasm GC] Signature Refining pass (#4326)
This is fairly short and simple after the recent refactorings. This basically
just finds all uses of each signature/function type, and then sees if it
receives more specific types as params. It then rewrites the types if so.
This just handles arguments so far, and not return types.
This differs from DeadArgumentElimination's refineArguments() in that
that pass modifies each function by itself, changing the type of the
function as needed. That is only valid if the type is not observable, that
is, if the function is called indirectly then DAE ignores it. This pass will
work on the types themselves, so it considers all functions sharing a
type as a whole, and when it upgrades that type it ends up affecting them
all.
This finds optimization opportunities on 4% of the total signature
types in j2wasm. Those lead to some benefits in later opts, but the
effect is not huge.
Diffstat (limited to 'src/tools/fuzzing/fuzzing.cpp')
0 files changed, 0 insertions, 0 deletions