summaryrefslogtreecommitdiff
path: root/chapter10/docs/example2c.gv
diff options
context:
space:
mode:
authorDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2024-04-29 00:11:36 +0100
committerGitHub <noreply@github.com>2024-04-28 16:11:36 -0700
commite31c37890a86aedfb209cf543baf05b1b60a27d2 (patch)
tree5c1151adb45e839a8f4b0f7cc918bf49771e52f1 /chapter10/docs/example2c.gv
parent17f9d743c06170f20773863bd1eca4f25ef41490 (diff)
downloadSimple-e31c37890a86aedfb209cf543baf05b1b60a27d2.tar.gz
Simple-e31c37890a86aedfb209cf543baf05b1b60a27d2.zip
Ch10update (#75)
* Store-after-Store peep * Load-after-Store peephole * Fix graph viz mem edge color bug * Scalar replace loop carried dependence * #67 Dead Not node hanging around - if we add a Not in the upcast then add it to the IterPeeps worklist to ensure it gets cleaned up. We don't see the Not node in the parser hence we cannot do a peep on it there. * #67 Update visuals. Add description of Store-Store and Store-Load peeps. Add examples. * #67 Undo the change that wasn't supposed to be committed! * #67 Update description of the Store-Store and Store-Load peepholes --------- Co-authored-by: Cliff Click <cliffc@acm.org>
Diffstat (limited to 'chapter10/docs/example2c.gv')
-rw-r--r--chapter10/docs/example2c.gv53
1 files changed, 53 insertions, 0 deletions
diff --git a/chapter10/docs/example2c.gv b/chapter10/docs/example2c.gv
new file mode 100644
index 00000000..7bd21542
--- /dev/null
+++ b/chapter10/docs/example2c.gv
@@ -0,0 +1,53 @@
+digraph chapter10 {
+/*
+struct Bar {
+ int a;
+ int b;
+}
+struct Foo {
+ int x;
+}
+Foo? foo = null;
+Bar bar = new Bar;
+bar.a = 1;
+bar.a = 2;
+return bar.a;
+
+*/
+ rankdir=BT;
+ concentrate="true";
+ compound="true";
+ subgraph cluster_Nodes {
+ Con_16 [ label="#2" ];
+ Store17 [ label=".a =" ];
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD><TD PORT="p2">$2</TD><TD PORT="p3">$3</TD><TD PORT="p4">$4</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Return19 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ new10 [ label="new Bar" ];
+ Con_11 [ label="#0" ];
+ Store13 [ label=".b =" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Store17 -> Start2:p2[taillabel=1 color=blue];
+ Store17 -> new10[taillabel=2];
+ Store17 -> Con_16[taillabel=3];
+ Return19 -> Start2:p0[taillabel=0 color=red];
+ Return19 -> Con_16[taillabel=1];
+ Return19 -> Store17[taillabel=2 color=blue];
+ Return19 -> Store13[taillabel=3 color=blue];
+ Return19 -> Start2:p4[taillabel=4 color=blue];
+ Stop3 -> Return19[taillabel=0 color=red];
+ new10 -> Start2:p0[taillabel=0 color=green];
+ Store13 -> Start2:p3[taillabel=1 color=blue];
+ Store13 -> new10[taillabel=2];
+ Store13 -> Con_11[taillabel=3];
+} \ No newline at end of file