diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-19 09:33:28 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-19 09:33:28 -0700 |
| commit | ef8d9c4630db6af79c25526c8e80c54a48df4e39 (patch) | |
| tree | c21474ceab3af7d8661ae93f7fc49002d96fcd43 /chapter15/README.md | |
| parent | 300d2a9c3672acacc8bdd8d5370a424651a00571 (diff) | |
| download | Simple-ef8d9c4630db6af79c25526c8e80c54a48df4e39.tar.gz Simple-ef8d9c4630db6af79c25526c8e80c54a48df4e39.zip | |
Fix memory on Load splitting up
Diffstat (limited to 'chapter15/README.md')
| -rw-r--r-- | chapter15/README.md | 6 |
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 |
