summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-04-09 13:31:52 -0700
committerGitHub <noreply@github.com>2024-04-09 13:31:52 -0700
commitfca1d3aa467303938b6d21a94931528ffcb02a6b (patch)
treeae20d9c8b3a11c0400f2e38933250de3f3516bec /src/wasm-binary.h
parent0ee46de2e3073609c062af98e5f8c13b9f5f5284 (diff)
downloadbinaryen-fca1d3aa467303938b6d21a94931528ffcb02a6b.tar.gz
binaryen-fca1d3aa467303938b6d21a94931528ffcb02a6b.tar.bz2
binaryen-fca1d3aa467303938b6d21a94931528ffcb02a6b.zip
Heap2Local: Optimize Arrays in addition to Structs (#6478)
To keep things simple, this adds a Array2Struct component to the pass. When we find a non-escaping array, we run that to turn it into a struct, and then run the existing Struct2Local to convert that to locals. This avoids refactoring Struct2Local to handle both structs and arrays (with the downside of making the optimization of arrays a little less efficient, but they are rarer, I suspect - that is certainly the case in Java output I've seen). The core EscapeAnalyzer logic is generalized to handle both arrays and structs, but the changes there are thankfully quite minor.
Diffstat (limited to 'src/wasm-binary.h')
0 files changed, 0 insertions, 0 deletions