summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-09-18 21:54:14 -0700
committerGitHub <noreply@github.com>2023-09-18 21:54:14 -0700
commita51bd6df919a5b79574f0996a760cc20cb05697e (patch)
tree32f67c9568aaee16b67ce0a4e6df1df2fb487036 /src/wasm/wasm-binary.cpp
parent6bab227860a6873204141e5ec9b14ed08d77fc62 (diff)
downloadbinaryen-a51bd6df919a5b79574f0996a760cc20cb05697e.tar.gz
binaryen-a51bd6df919a5b79574f0996a760cc20cb05697e.tar.bz2
binaryen-a51bd6df919a5b79574f0996a760cc20cb05697e.zip
Reland "Optimize tuple.extract of gets in BinaryInstWriter" (#5955)
In general, the binary lowering of tuple.extract expects that all the tuple values are on top of the stack, so it inserts drops and possibly uses a scratch local to ensure only the extracted value is left. However, when the extracted tuple expression is a local.get, local.tee, or global.get, it's much more efficient to change the lowering of the get or tee to ensure that only the extracted value is on the stack to begin with. Implement that optimization in the binary writer.
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
0 files changed, 0 insertions, 0 deletions