diff options
author | Alon Zakai <azakai@google.com> | 2022-03-30 09:27:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 09:27:51 -0700 |
commit | 3995481071fd746ca8b8479d182aad257cab82e2 (patch) | |
tree | c007ee925182f8093aac88df3f84223cdffef28e /test/lit/binary/stacky-nn-tuple.test | |
parent | cdf5d6e602f5d67116627384c11021b4fc0a3f4d (diff) | |
download | binaryen-3995481071fd746ca8b8479d182aad257cab82e2.tar.gz binaryen-3995481071fd746ca8b8479d182aad257cab82e2.tar.bz2 binaryen-3995481071fd746ca8b8479d182aad257cab82e2.zip |
[Wasm GC] GlobalTypeOptimization: Remove fields from end based on subtypes (#4553)
Previously we'd remove a field from a type if that field has no uses in any
sub- or super-type. In that case we'd remove it from all the types at once.
However, there is a case where we can remove a field only from a parent
but not from its children, if the field is at the end: if A has fields {x, y, z}
and its subtype B has fields {x, y, z, w}, and A pointers only access
field y while B pointers access all the fields, then we can remove z
from A. Removing it from the end is safe, and then B will not only add
w as it did before but also add z. Note that we cannot remove x,
because it is not at the end: removing it from just A but not B would
shift the indexes, making them incompatible.
Diffstat (limited to 'test/lit/binary/stacky-nn-tuple.test')
0 files changed, 0 insertions, 0 deletions