summaryrefslogtreecommitdiff
path: root/docs/chapter04/04-post-peephole.gv
diff options
context:
space:
mode:
authorDibyendu Majumdar <mobile@majumdar.org.uk>2023-10-20 15:21:08 -0700
committerDibyendu Majumdar <mobile@majumdar.org.uk>2024-10-23 17:51:09 -0700
commit83fdf059150e37c335a86e3dd4547a76a1c588db (patch)
tree7df24a5366647c8f9cf083ead43ca106f1d23430 /docs/chapter04/04-post-peephole.gv
parent0e8916e1a4ae550357401b37df6fdca683c221f7 (diff)
downloadSimple-linear-chapter04.tar.gz
Simple-linear-chapter04.zip
Chapter 4: External Argument and Comparisonslinear-chapter04
Co-authored-by: Cliff Click <cliffc@acm.org> Co-authored-by: Yichen Yan <oraluben@outlook.com> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Tamas Hadhazy <helsgithub15@gmail.com> Co-authored-by: Hels15 <helsgithub15@gmail.com> Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com>
Diffstat (limited to 'docs/chapter04/04-post-peephole.gv')
-rw-r--r--docs/chapter04/04-post-peephole.gv43
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/chapter04/04-post-peephole.gv b/docs/chapter04/04-post-peephole.gv
new file mode 100644
index 00000000..0a9f8e93
--- /dev/null
+++ b/docs/chapter04/04-post-peephole.gv
@@ -0,0 +1,43 @@
+digraph chapter04 {
+/*
+return 1+arg+2; #showGraph;
+*/
+ rankdir=BT;
+ ordering="in";
+ concentrate="true";
+ subgraph cluster_Nodes {
+ 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="p1">arg</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Con_10 [ label="#3" ];
+ Add11 [ label="+" ];
+ Return12 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ }
+ node [shape=plaintext];
+ subgraph cluster_Scope1_0 {
+ Scope1_0 [label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD BGCOLOR="cyan">0</TD><TD PORT="Scope1_0_$ctrl">$ctrl</TD><TD PORT="Scope1_0_arg">arg</TD></TR>
+ </TABLE>>];
+ subgraph cluster_Scope1_1 {
+ Scope1_1 [label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD BGCOLOR="cyan">1</TD></TR>
+ </TABLE>>];
+ }
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Add11 -> Start2:p1[taillabel=1];
+ Add11 -> Con_10[taillabel=2];
+ Return12 -> Start2:p0[taillabel=0; color=red];
+ Return12 -> Add11[taillabel=1];
+ edge [style=dashed color=cornflowerblue];
+ Scope1_0:"Scope1_0_arg" -> Start2:p1;
+}