summaryrefslogtreecommitdiff
path: root/chapter15/README.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-10-19 09:33:28 -0700
committerCliff Click <cliffc@acm.org>2026-10-19 09:33:28 -0700
commitef8d9c4630db6af79c25526c8e80c54a48df4e39 (patch)
treec21474ceab3af7d8661ae93f7fc49002d96fcd43 /chapter15/README.md
parent300d2a9c3672acacc8bdd8d5370a424651a00571 (diff)
downloadSimple-ef8d9c4630db6af79c25526c8e80c54a48df4e39.tar.gz
Simple-ef8d9c4630db6af79c25526c8e80c54a48df4e39.zip
Fix memory on Load splitting up
Diffstat (limited to 'chapter15/README.md')
-rw-r--r--chapter15/README.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/chapter15/README.md b/chapter15/README.md
index 1ce5badf..e384e7ce 100644
--- a/chapter15/README.md
+++ b/chapter15/README.md
@@ -127,6 +127,12 @@ from a distinct New can bypass the allocation to its memory input. Mere node
inequality is insufficient: a Phi or cast can still denote the allocated object.
Array length is set by a subsequent Store; the array body is zeroed by New.
Array accesses retain their existing control input as the bounds-check proxy.
+When pushing a Load through a memory Phi, its control must dominate the
+Region's immediate dominator, so both predecessor loads can retain that check.
+A check at the Region or below it cannot be copied onto the predecessors.
+For example, a Load guarded by `if (a# > 1)` must not move above that branch
+just because its memory comes from an earlier Phi. Memory ordering alone does
+not prove that `a[1]` is in bounds.
Both schedulers follow an alias through MemMerge to find New's memory effect.
MemMerge itself does not overwrite memory, but must not hide the ordering of