summaryrefslogtreecommitdiff
path: root/docs/chapter06/06-graph2-pre.gv
diff options
context:
space:
mode:
authorDibyendu Majumdar <mobile@majumdar.org.uk>2023-11-11 23:17:22 +0000
committerDibyendu Majumdar <mobile@majumdar.org.uk>2024-10-23 17:51:09 -0700
commitff11dd42bb845ad4a979b8924c678addb8681801 (patch)
treee225854c8474cee5e6eb0e041a99c84bea1478ba /docs/chapter06/06-graph2-pre.gv
parent369268fe6f3bd1dcd59117c8f831f04f4e3b0560 (diff)
downloadSimple-linear-chapter06.tar.gz
Simple-linear-chapter06.zip
Chapter 6: Peepholes for Iflinear-chapter06
Co-authored-by: Cliff Click <cliffc@acm.org> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Yichen Yan <oraluben@outlook.com> Co-authored-by: Tamas Hadhazy <helsgithub15@gmail.com> Co-authored-by: Robert Obkircher <robert.obkircher@gmail.com>
Diffstat (limited to 'docs/chapter06/06-graph2-pre.gv')
-rw-r--r--docs/chapter06/06-graph2-pre.gv55
1 files changed, 55 insertions, 0 deletions
diff --git a/docs/chapter06/06-graph2-pre.gv b/docs/chapter06/06-graph2-pre.gv
new file mode 100644
index 00000000..d183b4c4
--- /dev/null
+++ b/docs/chapter06/06-graph2-pre.gv
@@ -0,0 +1,55 @@
+digraph chapter06 {
+/*
+int a=1;
+if( true )
+ a=2;
+else
+ a=3;
+return a;
+
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ Return16 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ 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></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ Con_7 [ label="#1" ];
+ If8 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">If</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">True</TD><TD PORT="p1" BGCOLOR="yellow">False</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_12 [ label="#2" ];
+ Con_13 [ label="#3" ];
+ Region14 [ shape=box style=filled fillcolor=yellow label="Region" ];
+ Phi_a15 [ style=filled fillcolor=lightyellow label="&phi;_a" ];
+ { rank=same; Region14;Phi_a15;}
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Return16 -> Region14[taillabel=0 color=red];
+ Return16 -> Phi_a15[taillabel=1];
+ Stop3 -> Return16[taillabel=0 color=red];
+ If8 -> Start2:p0[taillabel=0 color=red];
+ If8 -> Con_7[taillabel=1];
+ Region14 -> If8:p0[taillabel=1 color=red];
+ Region14 -> If8:p1[taillabel=2 color=red];
+ Phi_a15 -> Region14 [style=dotted taillabel=0];
+ Phi_a15 -> Con_12[taillabel=1];
+ Phi_a15 -> Con_13[taillabel=2];
+}