summaryrefslogtreecommitdiff
path: root/docs/chapter02/02-pre-peephole-ex1.svg
diff options
context:
space:
mode:
authorDibyendu Majumdar <mobile@majumdar.org.uk>2023-09-26 17:43:36 +0100
committerDibyendu Majumdar <mobile@majumdar.org.uk>2024-10-23 17:51:09 -0700
commit4583516e98a41862560772b23c5e981d5f87272e (patch)
treedf3eb2af4c12cd73a6d9f16d170877707855d492 /docs/chapter02/02-pre-peephole-ex1.svg
parent47ad4a9f955fde76c6cf4022fc308f1d0723926d (diff)
downloadSimple-linear-chapter02.tar.gz
Simple-linear-chapter02.zip
Chapter 2: Arithmeticlinear-chapter02
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: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Co-authored-by: Tamás Hadházy <85063808+Hels15@users.noreply.github.com>
Diffstat (limited to 'docs/chapter02/02-pre-peephole-ex1.svg')
-rw-r--r--docs/chapter02/02-pre-peephole-ex1.svg168
1 files changed, 168 insertions, 0 deletions
diff --git a/docs/chapter02/02-pre-peephole-ex1.svg b/docs/chapter02/02-pre-peephole-ex1.svg
new file mode 100644
index 00000000..29c76bd8
--- /dev/null
+++ b/docs/chapter02/02-pre-peephole-ex1.svg
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.43.0 (0)
+ -->
+<!-- Title: chapter02 Pages: 1 -->
+<svg width="278pt" height="436pt"
+ viewBox="0.00 0.00 278.00 436.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 432)">
+<title>chapter02</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-432 274,-432 274,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-420 262,-420 262,-8 8,-8"/>
+</g>
+<!-- Start1 -->
+<g id="node1" class="node">
+<title>Start1</title>
+<polygon fill="yellow" stroke="black" points="162,-412 108,-412 108,-376 162,-376 162,-412"/>
+<text text-anchor="middle" x="135" y="-390.3" font-family="Times,serif" font-size="14.00">Start</text>
+</g>
+<!-- Con_2 -->
+<g id="node2" class="node">
+<title>Con_2</title>
+<ellipse fill="none" stroke="black" cx="222" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="222" y="-174.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- Con_2&#45;&gt;Start1 -->
+<g id="edge1" class="edge">
+<title>Con_2&#45;&gt;Start1</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M230.65,-195.54C245.5,-226.47 271.62,-294.07 243,-340 227.56,-364.77 196.8,-378.29 172.04,-385.46"/>
+<polygon fill="black" stroke="black" points="170.97,-382.13 162.2,-388.08 172.77,-388.89 170.97,-382.13"/>
+<text text-anchor="middle" x="227.65" y="-198.14" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_3 -->
+<g id="node3" class="node">
+<title>Con_3</title>
+<ellipse fill="none" stroke="black" cx="63" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="63" y="-318.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Con_3&#45;&gt;Start1 -->
+<g id="edge2" class="edge">
+<title>Con_3&#45;&gt;Start1</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M77.57,-337.17C86.92,-346.25 99.3,-358.29 110.17,-368.86"/>
+<polygon fill="black" stroke="black" points="107.79,-371.43 117.4,-375.89 112.67,-366.41 107.79,-371.43"/>
+<text text-anchor="middle" x="74.57" y="-339.77" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Con_4 -->
+<g id="node4" class="node">
+<title>Con_4</title>
+<ellipse fill="none" stroke="black" cx="135" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="135" y="-318.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Con_4&#45;&gt;Start1 -->
+<g id="edge3" class="edge">
+<title>Con_4&#45;&gt;Start1</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M135,-340.3C135,-348.02 135,-357.29 135,-365.89"/>
+<polygon fill="black" stroke="black" points="131.5,-365.9 135,-375.9 138.5,-365.9 131.5,-365.9"/>
+<text text-anchor="middle" x="132" y="-342.9" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Mul5 -->
+<g id="node5" class="node">
+<title>Mul5</title>
+<ellipse fill="none" stroke="black" cx="135" cy="-250" rx="27" ry="18"/>
+<text text-anchor="middle" x="135" y="-246.3" font-family="Times,serif" font-size="14.00">*</text>
+</g>
+<!-- Mul5&#45;&gt;Con_3 -->
+<g id="edge4" class="edge">
+<title>Mul5&#45;&gt;Con_3</title>
+<path fill="none" stroke="black" d="M120.43,-265.17C110.25,-275.06 96.48,-288.45 84.97,-299.64"/>
+<polygon fill="black" stroke="black" points="82.53,-297.13 77.8,-306.62 87.41,-302.15 82.53,-297.13"/>
+<text text-anchor="middle" x="117.43" y="-267.77" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Mul5&#45;&gt;Con_4 -->
+<g id="edge5" class="edge">
+<title>Mul5&#45;&gt;Con_4</title>
+<path fill="none" stroke="black" d="M135,-268.3C135,-276.02 135,-285.29 135,-293.89"/>
+<polygon fill="black" stroke="black" points="131.5,-293.9 135,-303.9 138.5,-293.9 131.5,-293.9"/>
+<text text-anchor="middle" x="132" y="-270.9" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Con_6 -->
+<g id="node6" class="node">
+<title>Con_6</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-322" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-318.3" font-family="Times,serif" font-size="14.00">#5</text>
+</g>
+<!-- Con_6&#45;&gt;Start1 -->
+<g id="edge6" class="edge">
+<title>Con_6&#45;&gt;Start1</title>
+<path fill="none" stroke="black" stroke-dasharray="1,5" d="M192.43,-337.17C183.08,-346.25 170.7,-358.29 159.83,-368.86"/>
+<polygon fill="black" stroke="black" points="157.33,-366.41 152.6,-375.89 162.21,-371.43 157.33,-366.41"/>
+<text text-anchor="middle" x="189.43" y="-339.77" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Minus7 -->
+<g id="node7" class="node">
+<title>Minus7</title>
+<ellipse fill="none" stroke="black" cx="207" cy="-250" rx="27" ry="18"/>
+<text text-anchor="middle" x="207" y="-246.3" font-family="Times,serif" font-size="14.00">&#45;</text>
+</g>
+<!-- Minus7&#45;&gt;Con_6 -->
+<g id="edge7" class="edge">
+<title>Minus7&#45;&gt;Con_6</title>
+<path fill="none" stroke="black" d="M207,-268.3C207,-276.02 207,-285.29 207,-293.89"/>
+<polygon fill="black" stroke="black" points="203.5,-293.9 207,-303.9 210.5,-293.9 203.5,-293.9"/>
+<text text-anchor="middle" x="204" y="-270.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Add8 -->
+<g id="node8" class="node">
+<title>Add8</title>
+<ellipse fill="none" stroke="black" cx="140" cy="-178" rx="27" ry="18"/>
+<text text-anchor="middle" x="140" y="-174.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add8&#45;&gt;Mul5 -->
+<g id="edge8" class="edge">
+<title>Add8&#45;&gt;Mul5</title>
+<path fill="none" stroke="black" d="M138.76,-196.3C138.21,-204.02 137.55,-213.29 136.94,-221.89"/>
+<polygon fill="black" stroke="black" points="133.44,-221.67 136.22,-231.9 140.43,-222.17 133.44,-221.67"/>
+<text text-anchor="middle" x="135.76" y="-198.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Add8&#45;&gt;Minus7 -->
+<g id="edge9" class="edge">
+<title>Add8&#45;&gt;Minus7</title>
+<path fill="none" stroke="black" d="M153.88,-193.5C163.14,-203.17 175.47,-216.06 185.93,-226.98"/>
+<polygon fill="black" stroke="black" points="183.69,-229.71 193.14,-234.51 188.75,-224.87 183.69,-229.71"/>
+<text text-anchor="middle" x="150.88" y="-196.1" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Add9 -->
+<g id="node9" class="node">
+<title>Add9</title>
+<ellipse fill="none" stroke="black" cx="140" cy="-106" rx="27" ry="18"/>
+<text text-anchor="middle" x="140" y="-102.3" font-family="Times,serif" font-size="14.00">+</text>
+</g>
+<!-- Add9&#45;&gt;Con_2 -->
+<g id="edge10" class="edge">
+<title>Add9&#45;&gt;Con_2</title>
+<path fill="none" stroke="black" d="M156.2,-120.83C168.18,-131.06 184.69,-145.15 198.18,-156.66"/>
+<polygon fill="black" stroke="black" points="196.23,-159.61 206.11,-163.44 200.78,-154.28 196.23,-159.61"/>
+<text text-anchor="middle" x="153.2" y="-123.43" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+<!-- Add9&#45;&gt;Add8 -->
+<g id="edge11" class="edge">
+<title>Add9&#45;&gt;Add8</title>
+<path fill="none" stroke="black" d="M140,-124.3C140,-132.02 140,-141.29 140,-149.89"/>
+<polygon fill="black" stroke="black" points="136.5,-149.9 140,-159.9 143.5,-149.9 136.5,-149.9"/>
+<text text-anchor="middle" x="137" y="-126.9" font-family="Helvetica,sans-Serif" font-size="8.00">2</text>
+</g>
+<!-- Return10 -->
+<g id="node10" class="node">
+<title>Return10</title>
+<polygon fill="yellow" stroke="black" points="125,-52 59,-52 59,-16 125,-16 125,-52"/>
+<text text-anchor="middle" x="92" y="-30.3" font-family="Times,serif" font-size="14.00">Return</text>
+</g>
+<!-- Return10&#45;&gt;Start1 -->
+<g id="edge12" class="edge">
+<title>Return10&#45;&gt;Start1</title>
+<path fill="none" stroke="red" d="M75.73,-52.27C53.67,-77.55 17,-127.09 17,-177 17,-177 17,-177 17,-251 17,-290.8 4.09,-307.45 27,-340 43.69,-363.72 74.05,-377.3 98.34,-384.76"/>
+<polygon fill="red" stroke="red" points="97.41,-388.14 107.99,-387.51 99.33,-381.4 97.41,-388.14"/>
+<text text-anchor="middle" x="72.73" y="-54.87" font-family="Helvetica,sans-Serif" font-size="8.00">0</text>
+</g>
+<!-- Return10&#45;&gt;Add9 -->
+<g id="edge13" class="edge">
+<title>Return10&#45;&gt;Add9</title>
+<path fill="none" stroke="black" d="M103.87,-52.3C109.82,-60.98 117.12,-71.63 123.6,-81.08"/>
+<polygon fill="black" stroke="black" points="120.71,-83.06 129.25,-89.33 126.49,-79.1 120.71,-83.06"/>
+<text text-anchor="middle" x="100.87" y="-54.9" font-family="Helvetica,sans-Serif" font-size="8.00">1</text>
+</g>
+</g>
+</svg>