From b475b072b38db7f46406ed6128fffe3e15a6e7ac Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Tue, 29 Sep 2026 13:08:30 -0700 Subject: forward port lazy memory to ch11 --- chapter11/docs/Makefile | 2 + chapter11/docs/graph1.gv | 15 +- chapter11/docs/graph1.svg | 317 ++++++++++++++++-------------- chapter11/docs/graph2.gv | 16 +- chapter11/docs/graph2.svg | 342 +++++++++++++++++--------------- chapter11/docs/graph3.gv | 16 +- chapter11/docs/graph3.svg | 354 ++++++++++++++++++--------------- chapter11/docs/graph4.gv | 19 +- chapter11/docs/graph4.svg | 435 +++++++++++++++++++++-------------------- chapter11/docs/graph5.gv | 20 +- chapter11/docs/graph5.svg | 486 ++++++++++++++++++++++++---------------------- chapter11/docs/graph6.gv | 20 +- chapter11/docs/graph6.svg | 478 ++++++++++++++++++++++++--------------------- chapter11/docs/graph8.gv | 2 +- chapter11/docs/graph8.svg | 104 +++++----- 15 files changed, 1402 insertions(+), 1224 deletions(-) (limited to 'chapter11/docs') diff --git a/chapter11/docs/Makefile b/chapter11/docs/Makefile index 12659b8f..055882b2 100644 --- a/chapter11/docs/Makefile +++ b/chapter11/docs/Makefile @@ -1,11 +1,13 @@ GV := $(wildcard *.gv) SVG := $(patsubst %.gv,%.svg,$(GV)) +.DELETE_ON_ERROR: .PHONY: all all: $(SVG) %.svg: %.gv dot -Tsvg $< > $@ + @sed -i 's/\r$$//' $@ .PHONY: clean clean: diff --git a/chapter11/docs/graph1.gv b/chapter11/docs/graph1.gv index 74c54fdb..3554a572 100644 --- a/chapter11/docs/graph1.gv +++ b/chapter11/docs/graph1.gv @@ -18,11 +18,12 @@ return i; Start - +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -44,14 +45,14 @@ return i; Con_21 [ label="#1" ]; Store22 [ label=".f =" ]; Region23 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_224 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_224 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Return25 [ shape=box style=filled fillcolor=yellow label="Return" ]; { rank=same; Region23;Phi_224;} } edge [ fontname=Helvetica, fontsize=8 ]; Stop3 -> Return25[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; - Store12 -> Start2:p2[taillabel=1 color=blue]; + Store12 -> Start2:p1[taillabel=1 color=blue]; Store12 -> new9[taillabel=2]; Store12 -> Con_11[taillabel=3]; new13 -> Start2:p0[taillabel=0 color=green]; @@ -61,7 +62,7 @@ return i; Load16 -> Store14[taillabel=1 color=blue]; Load16 -> new9[taillabel=2]; If17 -> Start2:p0[taillabel=0 color=red]; - If17 -> Start2:p1[taillabel=1]; + If17 -> Start2:p2[taillabel=1]; Store22 -> Store14[taillabel=1 color=blue]; Store22 -> new9[taillabel=2]; Store22 -> Con_21[taillabel=3]; @@ -71,6 +72,8 @@ return i; Phi_224 -> Store22[taillabel=1 color=blue]; Phi_224 -> Store14[taillabel=2 color=blue constraint=false]; Return25 -> Region23[taillabel=0 color=red]; - Return25 -> Load16[taillabel=1]; - Return25 -> Phi_224[taillabel=2 color=blue]; + Return25 -> Load16[taillabel=2]; + Return25 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_224[taillabel=2 color=blue]; } diff --git a/chapter11/docs/graph1.svg b/chapter11/docs/graph1.svg index 592db961..422d790e 100644 --- a/chapter11/docs/graph1.svg +++ b/chapter11/docs/graph1.svg @@ -1,285 +1,306 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +Phi_224 + +MemPhi_2 + + + +MemMerge->Phi_224 + + +2 - + Stop3 - -Stop + +Stop - + Return25 - -Return + +Return Stop3->Return25 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Con_11 - -#2 + +#2 - + Store12 - -.f = + +.f = -Store12->Start2:p2 - - -1 +Store12->Start2:p1 + + +1 Store12->new9 - - -2 + + +2 Store12->Con_11 - - -3 + + +3 - + new13 - -new S + +new S new13->Start2:p0 - - -0 + + +0 - + Store14 - -.f = + +.f = Store14->Con_4 - - -3 + + +3 Store14->Store12 - - -1 + + +1 Store14->new13 - - -2 + + +2 - + Load16 - -.f + +.f Load16->new9 - - -2 + + + +2 Load16->Store14 - - -1 + + +1 - + If17 - - -If - - - -True - - -False + + +If + + + +True + + +False If17->Start2:p0 - - -0 + + + +0 + + + +If17->Start2:p2 + + +1 - + Con_21 - -#1 + +#1 - + Store22 - -.f = + +.f = Store22->new9 - - -2 + +2 Store22->Store14 - - -1 + + +1 Store22->Con_21 - - -3 + + +3 - + Region23 - -Region + +Region Region23->If17:p0 - - -1 - - - -Region23->If17:p1 - - -2 - - - -Phi_224 - -φ_$2 + + +1 Phi_224->Store14 - - -2 + + +2 Phi_224->Store22 - - -1 + + +1 Phi_224->Region23 - - -0 + + +0 + + + +Return25->MemMerge + + +1 Return25->Load16 - - -1 + + +2 Return25->Region23 - - -0 - - - -Return25->Phi_224 - - -2 + + +0 diff --git a/chapter11/docs/graph2.gv b/chapter11/docs/graph2.gv index 04d02a3f..730cf845 100644 --- a/chapter11/docs/graph2.gv +++ b/chapter11/docs/graph2.gv @@ -18,11 +18,12 @@ return i;
Start
- +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -44,7 +45,7 @@ return i; Con_21 [ label="#1" ]; Store22 [ label=".f =" ]; Region23 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_224 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_224 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Return25 [ shape=box style=filled fillcolor=yellow label="Return" ]; { rank=same; Region23;Phi_224;} } @@ -52,7 +53,7 @@ return i; Stop3 -> Return25[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; Store12 -> Start2:p0[taillabel=0 color=red]; - Store12 -> Start2:p2[taillabel=1 color=blue]; + Store12 -> Start2:p1[taillabel=1 color=blue]; Store12 -> new9[taillabel=2]; Store12 -> Con_11[taillabel=3]; new13 -> Start2:p0[taillabel=0 color=green]; @@ -64,7 +65,7 @@ return i; Load16 -> Store14[taillabel=1 color=blue]; Load16 -> new9[taillabel=2]; If17 -> Start2:p0[taillabel=0 color=red]; - If17 -> Start2:p1[taillabel=1]; + If17 -> Start2:p2[taillabel=1]; Store22 -> Start2:p0[taillabel=0 color=red]; Store22 -> Store14[taillabel=1 color=blue]; Store22 -> new9[taillabel=2]; @@ -75,6 +76,9 @@ return i; Phi_224 -> Store22[taillabel=1 color=blue]; Phi_224 -> Store14[taillabel=2 color=blue constraint=false]; Return25 -> Region23[taillabel=0 color=red]; - Return25 -> Load16[taillabel=1]; - Return25 -> Phi_224[taillabel=2 color=blue]; + Return25 -> Load16[taillabel=2]; + Return25 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_224[taillabel=2 color=blue]; + MemMerge -> Region23[taillabel=0 color=green]; } diff --git a/chapter11/docs/graph2.svg b/chapter11/docs/graph2.svg index 00f7b594..b8d43cc9 100644 --- a/chapter11/docs/graph2.svg +++ b/chapter11/docs/graph2.svg @@ -1,309 +1,335 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +Region23 + +Region + + + +MemMerge->Region23 + + +0 + + + +Phi_224 + +MemPhi_2 + + + +MemMerge->Phi_224 + + +2 - + Stop3 - -Stop + +Stop - + Return25 - -Return + +Return Stop3->Return25 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Con_11 - -#2 + +#2 - + Store12 - -.f = + +.f = Store12->Start2:p0 - - - -0 + + + +0 Store12->new9 - - -2 + + +2 Store12->Con_11 - - -3 + + +3 - + new13 - -new S + +new S new13->Start2:p0 - - -0 + + +0 - + Store14 - -.f = + +.f = Store14->Start2:p0 - - -0 + + +0 Store14->Con_4 - - -3 + + +3 Store14->Store12 - - -1 + + +1 Store14->new13 - - - -2 + + +2 - + Load16 - -.f + +.f Load16->Start2:p0 - - - -0 + + + +0 Load16->new9 - - -2 + + + +2 Load16->Store14 - - -1 + + +1 - + If17 - - -If - - - -True - - -False + + +If + + + +True + + +False If17->Start2:p0 - -0 + +0 - + Con_21 - -#1 + +#1 - + Store22 - -.f = + +.f = Store22->Start2:p0 - - -0 + + +0 Store22->new9 - - - -2 + +2 Store22->Store14 - - -1 + + +1 Store22->Con_21 - - -3 - - - -Region23 - -Region + + +3 Region23->If17:p0 - - -1 + + +1 Region23->If17:p1 - - -2 - - - -Phi_224 - -φ_$2 + + +2 Phi_224->Store14 - - -2 + + +2 Phi_224->Store22 - - -1 + + +1 Phi_224->Region23 - - -0 + + +0 + + + +Return25->MemMerge + + +1 Return25->Load16 - - -1 + + + +2 Return25->Region23 - - -0 - - - -Return25->Phi_224 - - -2 + + +0 diff --git a/chapter11/docs/graph3.gv b/chapter11/docs/graph3.gv index c47ac565..d89d0ed4 100644 --- a/chapter11/docs/graph3.gv +++ b/chapter11/docs/graph3.gv @@ -18,11 +18,12 @@ return i;
Start
- +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -44,7 +45,7 @@ return i; Con_21 [ label="#1" ]; Store22 [ label=".f =" ]; Region23 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_224 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_224 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Return25 [ shape=box style=filled fillcolor=yellow label="Return" ]; { rank=same; Region23;Phi_224;} } @@ -52,7 +53,7 @@ return i; Stop3 -> Return25[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; Store12 -> Start2:p0[taillabel=0 color=red]; - Store12 -> Start2:p2[taillabel=1 color=blue]; + Store12 -> Start2:p1[taillabel=1 color=blue]; Store12 -> new9[taillabel=2]; Store12 -> Con_11[taillabel=3]; new13 -> Start2:p0[taillabel=0 color=green]; @@ -64,7 +65,7 @@ return i; Load16 -> Store14[taillabel=1 color=blue]; Load16 -> new9[taillabel=2]; If17 -> Start2:p0[taillabel=0 color=red]; - If17 -> Start2:p1[taillabel=1]; + If17 -> Start2:p2[taillabel=1]; Store22 -> If17:p0[taillabel=0 color=red]; Store22 -> Store14[taillabel=1 color=blue]; Store22 -> new9[taillabel=2]; @@ -76,6 +77,9 @@ return i; Phi_224 -> Store22[taillabel=1 color=blue]; Phi_224 -> Store14[taillabel=2 color=blue constraint=false]; Return25 -> Region23[taillabel=0 color=red]; - Return25 -> Load16[taillabel=1]; - Return25 -> Phi_224[taillabel=2 color=blue]; + Return25 -> Load16[taillabel=2]; + Return25 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_224[taillabel=2 color=blue]; + MemMerge -> Region23[taillabel=0 color=green]; } diff --git a/chapter11/docs/graph3.svg b/chapter11/docs/graph3.svg index e017c4af..a16a1733 100644 --- a/chapter11/docs/graph3.svg +++ b/chapter11/docs/graph3.svg @@ -1,316 +1,348 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +Region23 + +Region + + + +MemMerge->Region23 + + +0 + + + +Phi_224 + +MemPhi_2 + + + +MemMerge->Phi_224 + + +2 - + Stop3 - -Stop + +Stop - + Return25 - -Return + +Return Stop3->Return25 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Con_11 - -#2 + +#2 - + Store12 - -.f = + +.f = Store12->Start2:p0 - - - -0 + + + +0 Store12->new9 - - -2 + + +2 Store12->Con_11 - - -3 + + +3 - + new13 - -new S + +new S new13->Start2:p0 - - -0 + + +0 - + Store14 - -.f = + +.f = Store14->Start2:p0 - - -0 + +0 Store14->Con_4 - - -3 + + +3 Store14->Store12 - - -1 + + +1 Store14->new13 - - - -2 + + +2 - + Load16 - -.f + +.f Load16->Start2:p0 - - - -0 + + + +0 Load16->new9 - - -2 + + +2 Load16->Store14 - - -1 + + +1 - + If17 - - -If - - - -True - - -False + + +If + + + +True + + +False If17->Start2:p0 - -0 + + +0 + + + +If17->Start2:p2 + + +1 - + Con_21 - -#1 + +#1 - + Store22 - -.f = + +.f = Store22->new9 - - -2 + + +2 Store22->Store14 - - - -1 + + +1 Store22->Load16 - - -4 + + +4 Store22->If17:p0 - - -0 + + +0 Store22->Con_21 - - -3 - - - -Region23 - -Region + + +3 Region23->If17:p0 - - -1 + + +1 Region23->If17:p1 - - -2 - - - -Phi_224 - -φ_$2 + + +2 Phi_224->Store14 - - -2 + + +2 Phi_224->Store22 - - -1 + + +1 Phi_224->Region23 - - -0 + + +0 + + + +Return25->MemMerge + + +1 Return25->Load16 - - -1 + + +2 Return25->Region23 - - -0 - - - -Return25->Phi_224 - - -2 + + +0 diff --git a/chapter11/docs/graph4.gv b/chapter11/docs/graph4.gv index f6958ccb..cf622aa1 100644 --- a/chapter11/docs/graph4.gv +++ b/chapter11/docs/graph4.gv @@ -21,11 +21,12 @@ return v;
Start
- +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -57,10 +58,10 @@ return v; > ]; - Phi_230 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_230 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Store31 [ label=".f =" ]; Region32 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_233 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_233 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Sub35 [ label="-" ]; Con_36 [ label="#1" ]; Return37 [ shape=box style=filled fillcolor=yellow label="Return" ]; @@ -70,19 +71,19 @@ return v; edge [ fontname=Helvetica, fontsize=8 ]; Stop3 -> Return37[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; - Store10 -> Start2:p2[taillabel=1 color=blue]; + Store10 -> Start2:p1[taillabel=1 color=blue]; Store10 -> new9[taillabel=2]; Store10 -> Con_4[taillabel=3]; Loop11 -> Start2:p0[taillabel=1 color=red]; Loop11 -> Region32[taillabel=2 color=red constraint=false]; Phi_arg13 -> Loop11 [style=dotted taillabel=0]; - Phi_arg13 -> Start2:p1[taillabel=1]; + Phi_arg13 -> Start2:p2[taillabel=1]; Phi_arg13 -> Sub35[taillabel=2 constraint=false]; LT14 -> Con_4[taillabel=1]; LT14 -> Phi_arg13[taillabel=2]; If16 -> Loop11[taillabel=0 color=red]; If16 -> LT14[taillabel=1]; - Div21 -> Start2:p1[taillabel=1]; + Div21 -> Start2:p2[taillabel=1]; Div21 -> Con_22[taillabel=2]; EQ23 -> Phi_arg13[taillabel=1]; EQ23 -> Con_24[taillabel=2]; @@ -102,6 +103,8 @@ return v; Sub35 -> Phi_arg13[taillabel=1]; Sub35 -> Con_36[taillabel=2]; Return37 -> If16:p1[taillabel=0 color=red]; - Return37 -> new9[taillabel=1]; - Return37 -> Phi_230[taillabel=2 color=blue]; + Return37 -> new9[taillabel=2]; + Return37 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_230[taillabel=2 color=blue]; } diff --git a/chapter11/docs/graph4.svg b/chapter11/docs/graph4.svg index 7f392664..2730813a 100644 --- a/chapter11/docs/graph4.svg +++ b/chapter11/docs/graph4.svg @@ -1,408 +1,429 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +Phi_230 + +MemPhi_2 + + + +MemMerge->Phi_230 + + +2 - + Stop3 - -Stop + +Stop - + Return37 - -Return + +Return Stop3->Return37 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Store10 - -.f = + +.f = -Store10->Start2:p2 - - -1 +Store10->Start2:p1 + + +1 Store10->Con_4 - - -3 + + +3 Store10->new9 - - -2 + + +2 - + Loop11 - -Loop + +Loop Loop11->Start2:p0 - - -1 + + +1 - + Region32 - -Region + +Region Loop11->Region32 - - -2 + + +2 - + Phi_arg13 - -φ_arg + +φ_arg -Phi_arg13->Start2:p1 - - -1 +Phi_arg13->Start2:p2 + + +1 Phi_arg13->Loop11 - - -0 + + +0 - + Sub35 - -- + +- - + LT14 - -< + +< LT14->Con_4 - - -1 + + +1 LT14->Phi_arg13 - - -2 + + +2 - + If16 - - -If - - - -True - - -False + + +If + + + +True + + +False If16->Loop11 - - -0 + + +0 If16->LT14 - - -1 + + +1 - + Div21 - -// + +// -Div21->Start2:p1 - - -1 +Div21->Start2:p2 + + +1 - + Con_22 - -#3 + +#3 Div21->Con_22 - - -2 + + +2 - + EQ23 - -== + +== EQ23->Phi_arg13 - - -1 + + +1 - + Con_24 - -#5 + +#5 EQ23->Con_24 - - -2 + + +2 - + If25 - - -If - - - -True - - -False + + +If + + + +True + + +False If25->If16:p0 - - -0 + + +0 If25->EQ23 - - -1 - - - -Phi_230 - -φ_$2 + + +1 Phi_230->Store10 - - -1 + + +1 Phi_230->Loop11 - - -0 + + +0 - + Phi_233 - -φ_$2 + +MemPhi_2 - + Store31 - -.f = + +.f = Store31->new9 - -2 + + + +2 Store31->Div21 - - -3 + + +3 Store31->Phi_230 - - -1 + + +1 Region32->If25:p0 - - -1 + + +1 Region32->If25:p1 - - -2 + + +2 Phi_233->Phi_230 - - - -2 + + + +2 Phi_233->Store31 - - -1 + + +1 Phi_233->Region32 - - -0 + + +0 Sub35->Phi_arg13 - - - -1 + + + +1 - + Con_36 - -#1 + +#1 Sub35->Con_36 - - -2 + + +2 + + + +Return37->MemMerge + + +1 Return37->new9 - - - -1 + + +2 Return37->If16:p1 - - -0 - - - -Return37->Phi_230 - - -2 + + +0 diff --git a/chapter11/docs/graph5.gv b/chapter11/docs/graph5.gv index f89a83ac..0baa512f 100644 --- a/chapter11/docs/graph5.gv +++ b/chapter11/docs/graph5.gv @@ -21,11 +21,12 @@ return v;
Start
- +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -57,10 +58,10 @@ return v; > ]; - Phi_230 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_230 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Store31 [ label=".f =" ]; Region32 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_233 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_233 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Sub35 [ label="-" ]; Con_36 [ label="#1" ]; Return37 [ shape=box style=filled fillcolor=yellow label="Return" ]; @@ -71,13 +72,13 @@ return v; Stop3 -> Return37[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; Store10 -> Start2:p0[taillabel=0 color=red]; - Store10 -> Start2:p2[taillabel=1 color=blue]; + Store10 -> Start2:p1[taillabel=1 color=blue]; Store10 -> new9[taillabel=2]; Store10 -> Con_4[taillabel=3]; Loop11 -> Start2:p0[taillabel=1 color=red]; Loop11 -> Region32[taillabel=2 color=red constraint=false]; Phi_arg13 -> Loop11 [style=dotted taillabel=0]; - Phi_arg13 -> Start2:p1[taillabel=1]; + Phi_arg13 -> Start2:p2[taillabel=1]; Phi_arg13 -> Sub35[taillabel=2 constraint=false]; LT14 -> Loop11[taillabel=0 color=red]; LT14 -> Con_4[taillabel=1]; @@ -85,7 +86,7 @@ return v; If16 -> Loop11[taillabel=0 color=red]; If16 -> LT14[taillabel=1]; Div21 -> Start2[taillabel=0 color=red]; - Div21 -> Start2:p1[taillabel=1]; + Div21 -> Start2:p2[taillabel=1]; Div21 -> Con_22[taillabel=2]; EQ23 -> Loop11[taillabel=0 color=red]; EQ23 -> Phi_arg13[taillabel=1]; @@ -108,6 +109,9 @@ return v; Sub35 -> Phi_arg13[taillabel=1]; Sub35 -> Con_36[taillabel=2]; Return37 -> If16:p1[taillabel=0 color=red]; - Return37 -> new9[taillabel=1]; - Return37 -> Phi_230[taillabel=2 color=blue]; + Return37 -> new9[taillabel=2]; + Return37 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_230[taillabel=2 color=blue]; + MemMerge -> Loop11[taillabel=0 color=green]; } diff --git a/chapter11/docs/graph5.svg b/chapter11/docs/graph5.svg index 6dbf29f9..9336ac3e 100644 --- a/chapter11/docs/graph5.svg +++ b/chapter11/docs/graph5.svg @@ -1,452 +1,472 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +Loop11 + +Loop + + + +MemMerge->Loop11 + + +0 + + + +Phi_230 + +MemPhi_2 + + + +MemMerge->Phi_230 + + +2 - + Stop3 - -Stop + +Stop - + Return37 - -Return + +Return Stop3->Return37 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Store10 - -.f = + +.f = Store10->Start2:p0 - - - -0 - - - -Store10->Start2:p2 - - -1 + + +0 Store10->Con_4 - - -3 + + +3 Store10->new9 - - -2 - - - -Loop11 - -Loop + + +2 Loop11->Start2:p0 - -1 + + +1 - + Region32 - -Region + +Region Loop11->Region32 - - -2 + + +2 - + Phi_arg13 - -φ_arg + +φ_arg -Phi_arg13->Start2:p1 - - -1 +Phi_arg13->Start2:p2 + + +1 Phi_arg13->Loop11 - - -0 + + +0 - + Sub35 - -- + +- - + LT14 - -< + +< LT14->Con_4 - - -1 + + +1 LT14->Loop11 - - -0 + + +0 LT14->Phi_arg13 - - -2 + + +2 - + If16 - - -If - - - -True - - -False + + +If + + + +True + + +False If16->Loop11 - - -0 + + +0 If16->LT14 - - -1 + + +1 - + Div21 - -// + +// Div21->Start2 - - -0 + + +0 -Div21->Start2:p1 - - -1 +Div21->Start2:p2 + + +1 - + Con_22 - -#3 + +#3 Div21->Con_22 - - -2 + + +2 - + EQ23 - -== + +== EQ23->Loop11 - - -0 + + +0 EQ23->Phi_arg13 - - -1 + + +1 - + Con_24 - -#5 + +#5 EQ23->Con_24 - - -2 + + +2 - + If25 - - -If - - - -True - - -False + + +If + + + +True + + +False If25->If16:p0 - - -0 + + +0 If25->EQ23 - - -1 - - - -Phi_230 - -φ_$2 + + +1 Phi_230->Store10 - - -1 + + +1 Phi_230->Loop11 - - -0 + + +0 - + Phi_233 - -φ_$2 + +MemPhi_2 - + Store31 - -.f = + +.f = Store31->new9 - - -2 + + +2 Store31->Loop11 - - -0 + + +0 Store31->Div21 - - - -3 + + + +3 Store31->Phi_230 - - -1 + + +1 Region32->If25:p0 - - -1 + + +1 Region32->If25:p1 - - -2 + + +2 Phi_233->Phi_230 - - - -2 + + + +2 Phi_233->Store31 - - -1 + + +1 Phi_233->Region32 - - -0 + + +0 Sub35->Loop11 - - -0 + + +0 Sub35->Phi_arg13 - - - -1 + + + +1 - + Con_36 - -#1 + +#1 Sub35->Con_36 - - -2 + + +2 + + + +Return37->MemMerge + + +1 Return37->new9 - - - -1 + + + +2 Return37->If16:p1 - - -0 - - - -Return37->Phi_230 - - -2 + + +0 diff --git a/chapter11/docs/graph6.gv b/chapter11/docs/graph6.gv index dfd07d7e..ff97eebc 100644 --- a/chapter11/docs/graph6.gv +++ b/chapter11/docs/graph6.gv @@ -21,11 +21,12 @@ return v;
Start
- +
$ctrlarg$2
$ctrl$memarg
> ]; + MemMerge [ shape=box label="MemMerge" ]; Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ]; Con_4 [ label="#0" ]; new9 [ label="new S" ]; @@ -57,10 +58,10 @@ return v; > ]; - Phi_230 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_230 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Store31 [ label=".f =" ]; Region32 [ shape=box style=filled fillcolor=yellow label="Region" ]; - Phi_233 [ style=filled fillcolor=lightyellow label="φ_$2" ]; + Phi_233 [ style=filled fillcolor=lightyellow label="MemPhi_2" ]; Sub35 [ label="-" ]; Con_36 [ label="#1" ]; Return37 [ shape=box style=filled fillcolor=yellow label="Return" ]; @@ -71,13 +72,13 @@ return v; Stop3 -> Return37[taillabel=0 color=red]; new9 -> Start2:p0[taillabel=0 color=green]; Store10 -> Start2:p0[taillabel=0 color=red]; - Store10 -> Start2:p2[taillabel=1 color=blue]; + Store10 -> Start2:p1[taillabel=1 color=blue]; Store10 -> new9[taillabel=2]; Store10 -> Con_4[taillabel=3]; Loop11 -> Start2:p0[taillabel=1 color=red]; Loop11 -> Region32[taillabel=2 color=red constraint=false]; Phi_arg13 -> Loop11 [style=dotted taillabel=0]; - Phi_arg13 -> Start2:p1[taillabel=1]; + Phi_arg13 -> Start2:p2[taillabel=1]; Phi_arg13 -> Sub35[taillabel=2 constraint=false]; LT14 -> Loop11[taillabel=0 color=red]; LT14 -> Con_4[taillabel=1]; @@ -85,7 +86,7 @@ return v; If16 -> Loop11[taillabel=0 color=red]; If16 -> LT14[taillabel=1]; Div21 -> Start2:p0[taillabel=0 color=red]; - Div21 -> Start2:p1[taillabel=1]; + Div21 -> Start2:p2[taillabel=1]; Div21 -> Con_22[taillabel=2]; EQ23 -> If16:p0[taillabel=0 color=red]; EQ23 -> Phi_arg13[taillabel=1]; @@ -108,6 +109,9 @@ return v; Sub35 -> Phi_arg13[taillabel=1]; Sub35 -> Con_36[taillabel=2]; Return37 -> If16:p1[taillabel=0 color=red]; - Return37 -> new9[taillabel=1]; - Return37 -> Phi_230[taillabel=2 color=blue]; + Return37 -> new9[taillabel=2]; + Return37 -> MemMerge[taillabel=1 color=blue]; + MemMerge -> Start2:p1[taillabel=1 color=blue]; + MemMerge -> Phi_230[taillabel=2 color=blue]; + MemMerge -> If16:p1[taillabel=0 color=green]; } diff --git a/chapter11/docs/graph6.svg b/chapter11/docs/graph6.svg index 354f5d2f..8b8bb190 100644 --- a/chapter11/docs/graph6.svg +++ b/chapter11/docs/graph6.svg @@ -1,437 +1,471 @@ - - - + + chapter11 - + cluster_Nodes - + Start2 - - -Start - - - -$ctrl - -arg - -$2 + + +Start + + + +$ctrl + +$mem + +arg + + + +MemMerge + +MemMerge + + + +MemMerge->Start2:p1 + + +1 + + + +If16 + + +If + + + +True + + +False + + + +MemMerge->If16:p1 + + +0 + + + +Phi_230 + +MemPhi_2 + + + +MemMerge->Phi_230 + +2 - + Stop3 - -Stop + +Stop - + Return37 - -Return + +Return Stop3->Return37 - - -0 + + +0 - + Con_4 - -#0 + +#0 - + new9 - -new S + +new S new9->Start2:p0 - - -0 + + +0 - + Store10 - -.f = + +.f = Store10->Start2:p0 - - -0 + + +0 Store10->Con_4 - - -3 + + +3 Store10->new9 - - -2 + + +2 - + Loop11 - -Loop + +Loop Loop11->Start2:p0 - - -1 + + +1 - + Region32 - -Region + +Region Loop11->Region32 - - -2 + + +2 - + Phi_arg13 - -φ_arg + +φ_arg -Phi_arg13->Start2:p1 - - -1 +Phi_arg13->Start2:p2 + + +1 Phi_arg13->Loop11 - - -0 + + +0 - + Sub35 - -- + +- - + LT14 - -< + +< LT14->Con_4 - - -1 + + +1 LT14->Loop11 - - -0 + + +0 LT14->Phi_arg13 - - -2 - - - -If16 - - -If - - - -True - - -False + + +2 If16->Loop11 - - -0 + + +0 If16->LT14 - - -1 + + +1 - + Div21 - -// + +// Div21->Start2:p0 - - -0 + + +0 -Div21->Start2:p1 - - -1 +Div21->Start2:p2 + + +1 - + Con_22 - -#3 + +#3 Div21->Con_22 - - -2 + + +2 - + EQ23 - -== + +== EQ23->Phi_arg13 - - -1 + + +1 EQ23->If16:p0 - - -0 + + +0 - + Con_24 - -#5 + +#5 EQ23->Con_24 - - -2 + + +2 - + If25 - - -If - - - -True - - -False + + +If + + + +True + + +False If25->If16:p0 - - -0 + + +0 If25->EQ23 - - -1 - - - -Phi_230 - -φ_$2 + + +1 Phi_230->Store10 - - -1 + + +1 Phi_230->Loop11 - - -0 + + +0 - + Phi_233 - -φ_$2 + +MemPhi_2 - + Store31 - -.f = + +.f = Store31->new9 - - - -2 + + + + +2 Store31->Div21 - - -3 + + +3 Store31->If25:p0 - - -0 + + +0 Store31->Phi_230 - - -1 + + + +1 Region32->If25:p0 - - -1 + + +1 + + + +Region32->If25:p1 + + +2 Phi_233->Phi_230 - - - -2 + + + +2 Phi_233->Store31 - - -1 + + +1 Phi_233->Region32 - - -0 + + +0 Sub35->Phi_arg13 - - - -1 + + + +1 Sub35->Region32 - - -0 + + +0 - + Con_36 - -#1 + +#1 Sub35->Con_36 - - -2 + + +2 + + + +Return37->MemMerge + + +1 Return37->new9 - - -1 + +2 Return37->If16:p1 - - -0 - - - -Return37->Phi_230 - - -2 + + +0 diff --git a/chapter11/docs/graph8.gv b/chapter11/docs/graph8.gv index 1a7b231d..431cef46 100644 --- a/chapter11/docs/graph8.gv +++ b/chapter11/docs/graph8.gv @@ -39,7 +39,7 @@ return 0; Never18 -> Con_4[taillabel=1]; Stop3 -> Return21[taillabel=0 color=red]; Return21 -> Never18:p0[taillabel=0 color=red]; - Return21 -> Con_4[taillabel=1]; + Return21 -> Con_4[taillabel=2]; Loop8 -> Start2:p0[taillabel=1 color=red]; Loop8 -> Never18:p1[taillabel=2 color=red constraint=false]; } diff --git a/chapter11/docs/graph8.svg b/chapter11/docs/graph8.svg index c577cf84..a89eeeb5 100644 --- a/chapter11/docs/graph8.svg +++ b/chapter11/docs/graph8.svg @@ -1,115 +1,115 @@ - - - + + chapter11 - + cluster_Nodes - + Never18 - - -Never - - - -True - - -False + + +Never + + + +True + + +False Con_4 - -#0 + +#0 Never18->Con_4 - - -1 + + +1 Loop8 - -Loop + +Loop Never18->Loop8 - - -0 + + +0 Start2 - - -Start - - - -$ctrl + + +Start + + + +$ctrl Stop3 - -Stop + +Stop Return21 - -Return + +Return Stop3->Return21 - - -0 + + +0 Return21->Never18:p0 - - -0 + + +0 Return21->Con_4 - - -1 + + +2 Loop8->Never18:p1 - - -2 + + +2 Loop8->Start2:p0 - - -1 + + +1 -- cgit v1.2.3