summaryrefslogtreecommitdiff
path: root/chapter10b/README.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-09-29 12:21:46 -0700
committerCliff Click <cliffc@acm.org>2026-09-29 12:21:46 -0700
commit3ba6686fc991998a0a420709dfb0012bbddf77ab (patch)
tree6da4371d0ac6a0e17cfc31dad2275f1331ab3edb /chapter10b/README.md
parentfa7d56f72455828826d0ab7e1c142ca814e6e2aa (diff)
downloadSimple-ch10ab.tar.gz
Simple-ch10ab.zip
Backport lazy memory splits to ch10, split into ch10a and bch10ab
Diffstat (limited to 'chapter10b/README.md')
-rw-r--r--chapter10b/README.md23
1 files changed, 19 insertions, 4 deletions
diff --git a/chapter10b/README.md b/chapter10b/README.md
index 1779be50..795d2233 100644
--- a/chapter10b/README.md
+++ b/chapter10b/README.md
@@ -28,6 +28,8 @@ load-after-store forwarding turn the return value into 42.
![Independent field dependencies](docs/example1.svg)
These are schematic dependency graphs, with arrows from uses to their definitions.
+In horizontal diagrams, definitions appear on the left and uses on the right;
+in vertical diagrams, definitions appear above uses.
Control, pointer, and value edges are omitted when they do not explain memory.
## Equivalence-class aliasing
@@ -104,13 +106,26 @@ that would lose the explicit updates.
## Types and the worklist
-The memory type lattice adds a flat element `MEM#N` for each precise alias.
-Meeting different aliases gives `TypeMem.BOT`. It does not track field values,
-private objects, or escape information. Bulk exclusion sets belong to the
-graph nodes, not to an expanded type lattice.
+The type lattice retains Chapter 10a's six domains, colors, and notation:
+`⊤` means top, `⊥` means bottom, and a suffix names the domain. The other five
+domains are unchanged; memory now adds a flat element `MEM#N` for each precise
+alias between memory top (`TypeMem.TOP`) and memory bottom (`TypeMem.BOT`).
![The type domains, including precise memory aliases](docs/lattice.svg)
+The parallel `MEM#2`, `MEM#3`, and further alias elements describe independent
+field slices. For the first `Point` declaration above, these two aliases identify
+`Point.x` and `Point.y`. Meeting different aliases gives memory bottom; joining
+them gives memory top. Each precise alias is its own dual. The ellipsis stands
+for more parallel aliases, not a type representing a set of aliases.
+
+Memory bottom covers all memory. The default aggregate slot numbered 1 is a
+graph input position, not a precise field alias in this diagram. Types do not
+track field values, private objects, or escape information. Bulk exclusion sets
+and the default-plus-overrides structure of MemMerge belong to graph nodes,
+not to an expanded type lattice. As in Chapter 10a, diagram edges show lattice
+order, with top above bottom; field and tuple-element type lattices are elided.
+
Scalar Phis remain ordinary PhiNodes. The scope's Phi factory chooses a
BulkMemPhi for whole memory; splitting constructs MemPhis explicitly. Generic
arithmetic factoring through Phis must not factor a memory aggregate.