diff options
author | Alon Zakai <azakai@google.com> | 2021-03-09 11:53:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 11:53:05 -0800 |
commit | afc5fbd51759c07492fec4cae86d7e9484547626 (patch) | |
tree | d1fa421bc9c2887e112c4fbb31f4e415531118c9 /src/wasm/wasm-validator.cpp | |
parent | ef52d84bf6204a8a0f9348a9cc89e618526b8aae (diff) | |
download | binaryen-afc5fbd51759c07492fec4cae86d7e9484547626.tar.gz binaryen-afc5fbd51759c07492fec4cae86d7e9484547626.tar.bz2 binaryen-afc5fbd51759c07492fec4cae86d7e9484547626.zip |
Reducer: Improve reduction of function bodies and the factor for text reduction (#3668)
The old code tried to call visitExpression from outside of a walk on the
wasm, which works except that replaceCurrent does nothing as there is
no current node. Perhaps it should assert if called outside of a walk? Might
be an expensive check, but once we have no-assert builds maybe that's
worthwhile.
Replace that with a working check during the walk. Also limit the
frequency of it (do it 1000x more often than a normal reduction, but not
all the time like we used to).
Also optimize the starting factor for text reduction. Text files are much
larger for the same amount of IR, so the initial factor was far too high and
inefficient.
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
0 files changed, 0 insertions, 0 deletions