opt_clean: Better memory handling.
authorMarcelina Kościelnicka <mwk@0x04.net>
Thu, 8 Oct 2020 11:33:47 +0000 (13:33 +0200)
committerMarcelina Kościelnicka <mwk@0x04.net>
Thu, 8 Oct 2020 16:05:51 +0000 (18:05 +0200)
commit7670a89e1fde7d0774695ab81031a90fafdf56b9
tree063e90c411b1e76e395460c27402a9a504b7f00d
parentfd306b0520ac42323cbfacfa3a41e7a7a9379ec0
opt_clean: Better memory handling.

Previously, `$memwr` and `$meminit` cells were always preserved (along
with the memory itself).  With this change, they are instead part of the
main cell mark-and-sweep pass: a memory (and its `$meminit` and `$memwr`
cells) is only preserved iff any associated `$memrd` cell needs to be
preserved.
passes/opt/opt_clean.cc
tests/opt/opt_clean_mem.ys [new file with mode: 0644]