summaryrefslogtreecommitdiff
path: root/chapter04/docs/04-pre-peephole.gv
blob: e8016c87d1dd433a05f2cb04cc42607e35abf57f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
digraph chapter04 {
/*
return 1+arg+2; #showGraph;
*/
	rankdir=BT;
	subgraph cluster_Nodes {
		Start1 [ 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_4 [ label="#1" ];
		Con_5 [ label="#2" ];
		Add6 [ label="Add" ];
		Add7 [ label="Add" ];
		Return8 [ shape=box style=filled fillcolor=yellow label="Return" ];
	}
	node [shape=plaintext];
	subgraph cluster_0 {
		scope0 [label=<
			<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="cyan">0</TD><TD PORT="scope0_$ctrl">$ctrl</TD><TD PORT="scope0_arg">arg</TD></TR>
			</TABLE>>];
	subgraph cluster_1 {
		scope1 [label=<
			<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="cyan">1</TD></TR>
			</TABLE>>];
	}
	}
	Add6 -> Start1:p1;
	Add6 -> Con_5;
	Add7 -> Con_4;
	Add7 -> Add6;
	Return8 -> Start1:p0 [color=red];
	Return8 -> Add7;
	edge [style=dashed color=cornflowerblue];
	scope0:"scope0_$ctrl" -> Start1:p0;
	scope0:"scope0_arg" -> Start1:p1;
}