diff options
author | Alon Zakai <azakai@google.com> | 2024-08-07 11:34:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-07 11:34:25 -0700 |
commit | dc87572a2d24f7dd42bec3af3005f09bc2c26af3 (patch) | |
tree | c5561d5d9206c9fdc6e4139b7abbbddf5d1aa574 /src/wasm-interpreter.h | |
parent | 9163e0d155a85cc57883257b8cca6fcbb22fe7b6 (diff) | |
download | binaryen-dc87572a2d24f7dd42bec3af3005f09bc2c26af3.tar.gz binaryen-dc87572a2d24f7dd42bec3af3005f09bc2c26af3.tar.bz2 binaryen-dc87572a2d24f7dd42bec3af3005f09bc2c26af3.zip |
GTO: Remove minor optimization of avoiding ChildLocalizer sometimes (#6818)
The optimization is to only use ChildLocalizer, which moves children to
locals, if we actually have a reason to use it. It is simple enough to see if
we are removing fields with side effects here, and only call ChildLocalizer
if we are not. However, this will become much more complicated in a
subsequent PR which will reorder fields, which allows removing yet more
of them (without reordering, we can only remove fields at the end, if any
subtype needs the field).
This is a pretty minor optimization, as it avoids adding a few locals in the rare
case of struct.new operands having side effects. We run --gto at the
start of the pipeline, so later opts will clean that up anyhow. (Though, this
might make us a little less efficient, but the following PR will justify this
regression.)
Diffstat (limited to 'src/wasm-interpreter.h')
0 files changed, 0 insertions, 0 deletions