binaryen
binaryen copied to clipboard
Push `struct.new` down to make it more likely that heap stores can be optimized.
Heap stores (struct.set
) are optimized into the struct.new
when they are adjacent in a statement list.
Pushing struct.new
down when they are not adjacent increases the likelihood for heap stores to be optimized. Optimizing heap stores is a beneficial step in making struct fields immutable which in turn helps other various optimziations.