From e4dc3273f201ae741637b626998637cce973546b Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 2 Oct 2026 13:04:34 -0700 Subject: First pass README updates --- chapter10b/docs/example1.gv | 23 ++++--- chapter10b/docs/example1.svg | 60 ++++++++-------- chapter10b/docs/example2a.gv | 21 ++++-- chapter10b/docs/example2a.svg | 58 ++++++++-------- chapter10b/docs/example2b.gv | 23 +++++-- chapter10b/docs/example2b.svg | 72 ++++++++++---------- chapter10b/docs/example2c.gv | 19 ++++-- chapter10b/docs/example2c.svg | 38 +++++------ chapter10b/docs/lattice.gv | 2 +- chapter10b/docs/lattice.svg | 154 +++++++++++++++++++++--------------------- 10 files changed, 249 insertions(+), 221 deletions(-) (limited to 'chapter10b/docs') diff --git a/chapter10b/docs/example1.gv b/chapter10b/docs/example1.gv index 0b0a5feb..5e059d77 100644 --- a/chapter10b/docs/example1.gv +++ b/chapter10b/docs/example1.gv @@ -1,13 +1,20 @@ digraph Memory { + // IR styles match graph/web/render.js; arrows are use -> definition. + graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; + node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; + rankdir=BT; - node [shape=box]; - M [label="Initial memory"]; - X [label="Store x = 42"]; - Y [label="Loop: Store y"]; - L [label="Load x (42)"]; - L -> X -> M [color=blue]; Y -> M [color=green]; - MemMerge -> X [color=blue]; MemMerge -> Y [color=green]; - Return -> MemMerge; Return -> L; + + M [label="Initial memory" shape=octagon style="filled" fillcolor="#dcecff"]; + X [label="Store x = 42" shape=octagon style="filled" fillcolor="#dcecff"]; + Y [label="Loop: Store y" shape=octagon style="filled" fillcolor="#dcecff"]; + L [label="Load x (42)" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + L -> X -> M [color="#2867b2"]; Y -> M [color="#2867b2"]; + MemMerge -> X [color="#2867b2"]; MemMerge -> Y [color="#2867b2"]; + Return -> MemMerge [color="#2867b2"]; Return -> L; { rank=same; MemMerge -> L [style=invis]; } Y -> X [style=invis]; // Layout only: keep the stores in code order. + Return [shape=box style="filled" fillcolor="#fff1c4"]; + MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; } diff --git a/chapter10b/docs/example1.svg b/chapter10b/docs/example1.svg index 384b6e12..f0b57612 100644 --- a/chapter10b/docs/example1.svg +++ b/chapter10b/docs/example1.svg @@ -4,90 +4,90 @@ - - + + Memory - + M - -Initial memory + +Initial memory X - -Store x = 42 + +Store x = 42 X->M - - + + Y - -Loop: Store y + +Loop: Store y Y->M - - + + L - -Load x (42) + +Load x (42) L->X - - + + MemMerge - -MemMerge + +MemMerge MemMerge->X - - + + MemMerge->Y - - + + Return - -Return + +Return Return->L - - + + Return->MemMerge - - + + diff --git a/chapter10b/docs/example2a.gv b/chapter10b/docs/example2a.gv index d92eea41..187e63b9 100644 --- a/chapter10b/docs/example2a.gv +++ b/chapter10b/docs/example2a.gv @@ -1,10 +1,17 @@ digraph Memory { + // IR styles match graph/web/render.js; arrows are use -> definition. + graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; + node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; + rankdir=RL; - node [shape=box]; - M [label="Default memory"]; - X [label="Store x"]; - Y [label="Store y"]; - X -> M [color=blue]; Y -> M [color=green]; - MemMerge -> M [label="default"]; MemMerge -> X [label="x",color=blue]; - MemMerge -> Y [label="y",color=green]; Return -> MemMerge; + + M [label="Default memory" shape=octagon style="filled" fillcolor="#dcecff"]; + X [label="Store x" shape=octagon style="filled" fillcolor="#dcecff"]; + Y [label="Store y" shape=octagon style="filled" fillcolor="#dcecff"]; + X -> M [color="#2867b2"]; Y -> M [color="#2867b2"]; + MemMerge -> M [xlabel="default",color="#2867b2"]; MemMerge -> X [xlabel="x",color="#2867b2"]; + MemMerge -> Y [xlabel="y",color="#2867b2"]; Return -> MemMerge [color="#2867b2"]; + Return [shape=box style="filled" fillcolor="#fff1c4"]; + MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; } diff --git a/chapter10b/docs/example2a.svg b/chapter10b/docs/example2a.svg index 97fb144e..47bc3a8f 100644 --- a/chapter10b/docs/example2a.svg +++ b/chapter10b/docs/example2a.svg @@ -4,79 +4,79 @@ - - + + Memory - + M - -Default memory + +Default memory X - -Store x + +Store x X->M - - + + Y - -Store y + +Store y Y->M - - + + MemMerge - -MemMerge + +MemMerge MemMerge->M - - -default + + +default MemMerge->X - - -x + + +x MemMerge->Y - - -y + + +y Return - -Return + +Return Return->MemMerge - - + + diff --git a/chapter10b/docs/example2b.gv b/chapter10b/docs/example2b.gv index 4ddd36b5..39b87a6a 100644 --- a/chapter10b/docs/example2b.gv +++ b/chapter10b/docs/example2b.gv @@ -1,10 +1,19 @@ digraph Memory { + // IR styles match graph/web/render.js; arrows are use -> definition. + graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; + node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; + rankdir=RL; - node [shape=box]; - P [label="MemPhi(x)"]; - B [label="BulkMemPhi(All except x)"]; - P -> Left [label="slice x",color=blue]; P -> Right [label="slice x",color=blue]; - B -> Left; B -> Right; - P -> Region [style=dashed]; B -> Region [style=dashed]; - MemMerge -> P [label="x",color=blue]; MemMerge -> B [label="default"]; + + P [label="MemPhi(x)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; + B [label="BulkMemPhi(All except x)" shape=hexagon style="filled" fillcolor="#f5e4fa"]; + P -> Left [xlabel="slice x",color="#2867b2"]; P -> Right [xlabel="slice x",color="#2867b2"]; + B -> Left [color="#2867b2"]; B -> Right [color="#2867b2"]; + P -> Region [style=dashed,color="#9396a3"]; B -> Region [style=dashed,color="#9396a3"]; + MemMerge -> P [xlabel="x",color="#2867b2"]; MemMerge -> B [xlabel="default",color="#2867b2"]; + MemMerge [shape=octagon style="filled" fillcolor="#dcecff"]; + Left [shape=octagon style="filled" fillcolor="#dcecff"]; + Right [shape=octagon style="filled" fillcolor="#dcecff"]; + Region [shape=trapezium style="filled" fillcolor="#fff1c4"]; } diff --git a/chapter10b/docs/example2b.svg b/chapter10b/docs/example2b.svg index 4e0616f1..cb10b90b 100644 --- a/chapter10b/docs/example2b.svg +++ b/chapter10b/docs/example2b.svg @@ -4,98 +4,98 @@ - - + + Memory - + P - -MemPhi(x) + +MemPhi(x) Left - -Left + +Left P->Left - - -slice x + + +slice x Right - -Right + +Right P->Right - - -slice x + + +slice x Region - -Region + +Region P->Region - - + + B - -BulkMemPhi(All except x) + +BulkMemPhi(All except x) B->Left - - + + B->Right - - + + B->Region - - + + MemMerge - -MemMerge + +MemMerge MemMerge->P - - -x + + +x MemMerge->B - - -default + + +default diff --git a/chapter10b/docs/example2c.gv b/chapter10b/docs/example2c.gv index 4fae3bba..b32d186d 100644 --- a/chapter10b/docs/example2c.gv +++ b/chapter10b/docs/example2c.gv @@ -1,10 +1,15 @@ digraph Memory { + // IR styles match graph/web/render.js; arrows are use -> definition. + graph [bgcolor="#fafbfc" fontname="Helvetica" nodesep=0.35 ranksep=0.55 splines=ortho]; + node [fontname="Helvetica" fontsize=12 color="#758191" fontcolor="#152330" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + edge [fontname="Helvetica" fontsize=9 color="#536477" fontcolor="#364352" arrowsize=0.7 penwidth=1.5]; + rankdir=RL; - node [shape=box]; - M [label="Prior x memory"]; - L [label="Load p.x"]; - S [label="Store p.x"]; - L -> M [color=blue]; S -> M [color=blue]; - S -> L [style=dashed,label="execute load first"]; - Y [label="Store p.y: independent"]; + + M [label="Prior x memory" shape=octagon style="filled" fillcolor="#dcecff"]; + L [label="Load p.x" shape=box style="rounded,filled" fillcolor="#edf3f7"]; + S [label="Store p.x" shape=octagon style="filled" fillcolor="#dcecff"]; + L -> M [color="#2867b2"]; S -> M [color="#2867b2"]; + S -> L [style=dashed,xlabel="execute load first"]; + Y [label="Store p.y: independent" shape=octagon style="filled" fillcolor="#dcecff"]; } diff --git a/chapter10b/docs/example2c.svg b/chapter10b/docs/example2c.svg index 8249d677..531fabfe 100644 --- a/chapter10b/docs/example2c.svg +++ b/chapter10b/docs/example2c.svg @@ -4,53 +4,53 @@ - - + + Memory - + M - -Prior x memory + +Prior x memory L - -Load p.x + +Load p.x L->M - - + + S - -Store p.x + +Store p.x S->M - - + + S->L - - -execute load first + + +execute load first Y - -Store p.y: independent + +Store p.y: independent diff --git a/chapter10b/docs/lattice.gv b/chapter10b/docs/lattice.gv index f9fb2b09..a37a1738 100644 --- a/chapter10b/docs/lattice.gv +++ b/chapter10b/docs/lattice.gv @@ -69,7 +69,7 @@ digraph Lattice { STRUCT_BOT [label="⊥:struct\n[struct bottom]"]; STRUCT_PERSON [label="Person\nage: int", shape=box]; STRUCT_S1 [label="s1\nx: int", shape=box]; - STRUCT_S2 [label="s2\nx: int, y: *s1", shape=box]; + STRUCT_S2 [label="s2\nx: int, y: int", shape=box]; STRUCT_MORE [label="…", shape=box]; {rank=same; STRUCT_PERSON; STRUCT_S1; STRUCT_S2; STRUCT_MORE;} STRUCT_PERSON -> STRUCT_S1 -> STRUCT_S2 -> STRUCT_MORE [style=invis]; diff --git a/chapter10b/docs/lattice.svg b/chapter10b/docs/lattice.svg index a11452b9..ff554601 100644 --- a/chapter10b/docs/lattice.svg +++ b/chapter10b/docs/lattice.svg @@ -4,11 +4,11 @@ - + Lattice - + cluster_control @@ -26,21 +26,21 @@ cluster_struct - -Struct -named collection of named scalar types + +Struct +named collection of named scalar types cluster_memory - -Memory -precise alias slices + +Memory +precise alias slices cluster_tuple - -Tuple -collection of types + +Tuple +collection of types @@ -101,26 +101,26 @@ MEM_TOP - -⊤:mem + +⊤:mem TOP->MEM_TOP - - + + TUPLE_TOP - -⊤:tuple + +⊤:tuple TOP->TUPLE_TOP - - + + @@ -416,27 +416,27 @@ STRUCT_S2 - -s2 -x: int, y: *s1 + +s2 +x: int, y: int STRUCT_TOP->STRUCT_S2 - - + + STRUCT_MORE - -… + +… STRUCT_TOP->STRUCT_MORE - - + + @@ -469,152 +469,152 @@ STRUCT_S2->STRUCT_BOT - - + + STRUCT_MORE->STRUCT_BOT - - + + MEM_ALIAS2 - -MEM#2 + +MEM#2 MEM_TOP->MEM_ALIAS2 - - + + MEM_ALIAS3 - -MEM#3 + +MEM#3 MEM_TOP->MEM_ALIAS3 - - + + MEM_MORE - -… + +… MEM_TOP->MEM_MORE - - + + MEM_BOT - -⊥:mem + +⊥:mem MEM_BOT->BOT - - + + MEM_ALIAS2->MEM_BOT - - + + MEM_ALIAS3->MEM_BOT - - + + MEM_MORE->MEM_BOT - - + + TUPLE1 - -(type) + +(type) TUPLE_TOP->TUPLE1 - - + + TUPLE2 - -(type, type) + +(type, type) TUPLE_TOP->TUPLE2 - - + + TUPLEN - -(type, …) + +(type, …) TUPLE_TOP->TUPLEN - - + + TUPLE_BOT - -⊥:tuple + +⊥:tuple TUPLE_BOT->BOT - - + + TUPLE1->TUPLE_BOT - - + + TUPLE2->TUPLE_BOT - - + + TUPLEN->TUPLE_BOT - - + + -- cgit v1.2.3