diff options
author | Alon Zakai <azakai@google.com> | 2023-11-28 15:32:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 23:32:01 +0000 |
commit | dbcac17d645d8ace8ae2cb69d6ba36b22d59b7cf (patch) | |
tree | e1a9d96c28af13c8317f6a71846532dd54bec1cd /scripts/gen-s-parser.py | |
parent | 2ea76680ae728a3f41d493a3fc27344696bb0dcf (diff) | |
download | binaryen-dbcac17d645d8ace8ae2cb69d6ba36b22d59b7cf.tar.gz binaryen-dbcac17d645d8ace8ae2cb69d6ba36b22d59b7cf.tar.bz2 binaryen-dbcac17d645d8ace8ae2cb69d6ba36b22d59b7cf.zip |
[NFC] Move InstrumentedPass logic out and use it in another place (#6132)
Asyncify gained a way to wrap a pass so that it only runs on a given set of
functions, rather than on all functions, so the wrapper "filters" what the pass
operates on. That was useful in Asyncify as we wanted to only do work on
functions that Asyncify actually instrumented.
There is another place in the code that needs such functionality,
optimizeAfterInlining, which runs optimizations after we inline; again, we
only want to optimize on the functions we know are relevant because they
changed. To do that, move that logic out to a general place so it can be
reused. This makes the code there a lot less hackish.
While doing so make the logic only work on function-parallel passes. It
never did anyhow, but now it asserts on that. (It can't run on a general
pass because a general one does not provide an interface to affect which
functions it operates on; a general pass is entirely opaque in that way.)
Diffstat (limited to 'scripts/gen-s-parser.py')
0 files changed, 0 insertions, 0 deletions