summaryrefslogtreecommitdiff
path: root/src/ir/literal-utils.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-11-09 08:41:27 -0800
committerGitHub <noreply@github.com>2023-11-09 08:41:27 -0800
commitc37fc0995a6fc0dcfc3fef0622f591715610c948 (patch)
tree34126381726ab3c00eb2b09eb63010feec3846db /src/ir/literal-utils.h
parentd6df91bcd0d9a67c63e336ae05f095cbcbf68df7 (diff)
downloadbinaryen-c37fc0995a6fc0dcfc3fef0622f591715610c948.tar.gz
binaryen-c37fc0995a6fc0dcfc3fef0622f591715610c948.tar.bz2
binaryen-c37fc0995a6fc0dcfc3fef0622f591715610c948.zip
Heap2Local: Fix an ordering issue with children having different interactions with a parent (#6089)
We had a simple rule that if we reach an expression twice then we give up, which makes sense for say a block: if one allocation flows out of it, then another can't - it would get mixed in with the other one, which is a case we don't optimize. However, there are cases where a parent has multiple children and different interactions with them, like a struct.set: the reference child does not escape, but the value child does. Before this PR if we reached the value child first, we'd mark the parent as seen, and then the reference child would see it isn't the first to get here, and not optimize. To fix this, reorder the code to handle this case. The manner of interaction between the child and the parent decides whether we mark the parent as seen and to be further avoided. Noticed by the determinism fuzzer, since the order of analysis mattered here.
Diffstat (limited to 'src/ir/literal-utils.h')
0 files changed, 0 insertions, 0 deletions