Skip to content

Instantly share code, notes, and snippets.

@solson
Created December 29, 2015 00:17
Show Gist options
  • Save solson/480175dcf7639df69906 to your computer and use it in GitHub Desktop.
Save solson/480175dcf7639df69906 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<?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.38.0 (20140413.2041)
-->
<!-- Title: Mir Pages: 1 -->
<svg width="2676pt" height="1105pt"
viewBox="0.00 0.00 2675.50 1105.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 1101)">
<title>Mir</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-1101 2671.5,-1101 2671.5,4 -4,4"/>
<!-- BB0 -->
<g id="node1" class="node"><title>BB0</title>
<polygon fill="none" stroke="black" points="883.5,-1072 883.5,-1093 2659.5,-1093 2659.5,-1072 883.5,-1072"/>
<text text-anchor="start" x="1759" y="-1079.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₀</text>
<polygon fill="none" stroke="black" points="883.5,-1051 883.5,-1072 2659.5,-1072 2659.5,-1051 883.5,-1051"/>
<text text-anchor="start" x="886.5" y="-1057.8" font-family="Times,serif" font-size="14.00">Var₀ = Arg₀</text>
<polygon fill="none" stroke="black" points="883.5,-1030 883.5,-1051 2659.5,-1051 2659.5,-1030 883.5,-1030"/>
<text text-anchor="start" x="886.5" y="-1036.8" font-family="Times,serif" font-size="14.00">Var₁ = Constant { span: test.rs:28:20: 28:21, ty: usize, literal: Value { value: Uint(1) } }</text>
<polygon fill="none" stroke="black" points="883.5,-1009 883.5,-1030 2659.5,-1030 2659.5,-1009 883.5,-1009"/>
<text text-anchor="start" x="886.5" y="-1015.8" font-family="Times,serif" font-size="14.00">Temp₄ = Var₀</text>
<polygon fill="none" stroke="black" points="883.5,-988 883.5,-1009 2659.5,-1009 2659.5,-988 883.5,-988"/>
<text text-anchor="start" x="886.5" y="-994.8" font-family="Times,serif" font-size="14.00">Temp₃ = Aggregate&lt;Adt(core::ops::Range, 0, Substs[types=[[usize];[];[]], regions=[[];[];[]]])&gt;([Constant { span: test.rs:29:14: 29:15, ty: usize, literal: Value { value: Uint(1) } }, Temp₄])</text>
<polygon fill="cornsilk" stroke="none" points="883.5,-967 883.5,-988 2659.5,-988 2659.5,-967 883.5,-967"/>
<polygon fill="none" stroke="black" points="883.5,-967 883.5,-988 2659.5,-988 2659.5,-967 883.5,-967"/>
<text text-anchor="start" x="886.5" y="-973.8" font-family="Times,serif" font-size="14.00">Temp₂ = Constant { span: test.rs:29:5: 31:6, ty: fn(core::ops::Range&lt;usize&gt;) &#45;&gt; core::ops::Range&lt;usize&gt; {core::iter::IntoIterator::into_iter}, literal: Item { def_id: DefId { krate: 2, node: DefIndex(27904) }, kind: Method, substs: Substs[types=[[];[core::ops::Range&lt;usize&gt;];[]], regions=[[];[];[]]] } }(Temp₃) &#45;&gt; (BB₃, BB₄)</text>
</g>
<!-- BB3 -->
<g id="node4" class="node"><title>BB3</title>
<polygon fill="none" stroke="black" points="1031.5,-886.5 1031.5,-907.5 1119.5,-907.5 1119.5,-886.5 1031.5,-886.5"/>
<text text-anchor="start" x="1063" y="-894.3" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₃</text>
<polygon fill="none" stroke="black" points="1031.5,-865.5 1031.5,-886.5 1119.5,-886.5 1119.5,-865.5 1031.5,-865.5"/>
<text text-anchor="start" x="1034.5" y="-872.3" font-family="Times,serif" font-size="14.00">Var₃ = Temp₂</text>
<polygon fill="cornsilk" stroke="none" points="1031.5,-844.5 1031.5,-865.5 1119.5,-865.5 1119.5,-844.5 1031.5,-844.5"/>
<polygon fill="none" stroke="black" points="1031.5,-844.5 1031.5,-865.5 1119.5,-865.5 1119.5,-844.5 1031.5,-844.5"/>
<text text-anchor="start" x="1034.5" y="-851.3" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₆</text>
</g>
<!-- BB0&#45;&gt;BB3 -->
<g id="edge1" class="edge"><title>BB0&#45;&gt;BB3</title>
<path fill="none" stroke="black" d="M1468.25,-962.991C1344.4,-936.031 1212.85,-907.398 1137.78,-891.058"/>
<polygon fill="black" stroke="black" points="1138.09,-887.542 1127.57,-888.835 1136.6,-894.382 1138.09,-887.542"/>
<text text-anchor="middle" x="1386" y="-933.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB4 -->
<g id="node5" class="node"><title>BB4</title>
<polygon fill="none" stroke="black" points="1492.5,-273 1492.5,-294 1567.5,-294 1567.5,-273 1492.5,-273"/>
<text text-anchor="start" x="1517.5" y="-280.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₄</text>
<polygon fill="none" stroke="black" points="1492.5,-252 1492.5,-273 1567.5,-273 1567.5,-252 1492.5,-252"/>
<text text-anchor="start" x="1495.5" y="-258.8" font-family="Times,serif" font-size="14.00">drop Temp₂</text>
<polygon fill="none" stroke="black" points="1492.5,-231 1492.5,-252 1567.5,-252 1567.5,-231 1492.5,-231"/>
<text text-anchor="start" x="1495.5" y="-237.8" font-family="Times,serif" font-size="14.00">drop Temp₃</text>
<polygon fill="cornsilk" stroke="none" points="1492.5,-210 1492.5,-231 1567.5,-231 1567.5,-210 1492.5,-210"/>
<polygon fill="none" stroke="black" points="1492.5,-210 1492.5,-231 1567.5,-231 1567.5,-210 1492.5,-210"/>
<text text-anchor="start" x="1495.5" y="-216.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₂</text>
</g>
<!-- BB0&#45;&gt;BB4 -->
<g id="edge2" class="edge"><title>BB0&#45;&gt;BB4</title>
<path fill="none" stroke="black" d="M1809.37,-962.868C1820.86,-937.069 1830.5,-906.714 1830.5,-877.5 1830.5,-877.5 1830.5,-877.5 1830.5,-457 1830.5,-339.803 1672.2,-285.303 1585.2,-264.199"/>
<polygon fill="black" stroke="black" points="1585.75,-260.733 1575.22,-261.847 1584.15,-267.546 1585.75,-260.733"/>
<text text-anchor="middle" x="1834" y="-668.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- BB1 -->
<g id="node2" class="node"><title>BB1</title>
<polygon fill="none" stroke="black" points="1109.5,-46 1109.5,-67 1148.5,-67 1148.5,-46 1109.5,-46"/>
<text text-anchor="start" x="1116.5" y="-53.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₁</text>
<polygon fill="cornsilk" stroke="none" points="1109.5,-25 1109.5,-46 1148.5,-46 1148.5,-25 1109.5,-25"/>
<polygon fill="none" stroke="black" points="1109.5,-25 1109.5,-46 1148.5,-46 1148.5,-25 1109.5,-25"/>
<text text-anchor="start" x="1112.5" y="-31.8" font-family="Times,serif" font-size="14.00">return</text>
</g>
<!-- BB2 -->
<g id="node3" class="node"><title>BB2</title>
<polygon fill="none" stroke="black" points="1506.5,-46 1506.5,-67 1553.5,-67 1553.5,-46 1506.5,-46"/>
<text text-anchor="start" x="1517.5" y="-53.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₂</text>
<polygon fill="cornsilk" stroke="none" points="1506.5,-25 1506.5,-46 1553.5,-46 1553.5,-25 1506.5,-25"/>
<polygon fill="none" stroke="black" points="1506.5,-25 1506.5,-46 1553.5,-46 1553.5,-25 1506.5,-25"/>
<text text-anchor="start" x="1509.5" y="-31.8" font-family="Times,serif" font-size="14.00">diverge</text>
</g>
<!-- BB6 -->
<g id="node7" class="node"><title>BB6</title>
<polygon fill="none" stroke="black" points="8.5,-765 8.5,-786 1795.5,-786 1795.5,-765 8.5,-765"/>
<text text-anchor="start" x="889.5" y="-772.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₆</text>
<polygon fill="none" stroke="black" points="8.5,-744 8.5,-765 1795.5,-765 1795.5,-744 8.5,-744"/>
<text text-anchor="start" x="11.5" y="-750.8" font-family="Times,serif" font-size="14.00">Temp₇ = &amp;ReScope(CodeExtent(77/Misc(154))) Mut Var₃</text>
<polygon fill="none" stroke="black" points="8.5,-723 8.5,-744 1795.5,-744 1795.5,-723 8.5,-723"/>
<text text-anchor="start" x="11.5" y="-729.8" font-family="Times,serif" font-size="14.00">Temp₆ = &amp;ReScope(CodeExtent(77/Misc(154))) Mut (*Temp₇)</text>
<polygon fill="cornsilk" stroke="none" points="8.5,-702 8.5,-723 1795.5,-723 1795.5,-702 8.5,-702"/>
<polygon fill="none" stroke="black" points="8.5,-702 8.5,-723 1795.5,-723 1795.5,-702 8.5,-702"/>
<text text-anchor="start" x="11.5" y="-708.8" font-family="Times,serif" font-size="14.00">Temp₅ = Constant { span: test.rs:29:5: 31:6, ty: fn(&amp;mut core::ops::Range&lt;usize&gt;) &#45;&gt; core::option::Option&lt;usize&gt; {core::iter::Iterator::next}, literal: Item { def_id: DefId { krate: 2, node: DefIndex(27548) }, kind: Method, substs: Substs[types=[[];[core::ops::Range&lt;usize&gt;];[]], regions=[[];[];[]]] } }(Temp₆) &#45;&gt; (BB₇, BB₈)</text>
</g>
<!-- BB3&#45;&gt;BB6 -->
<g id="edge3" class="edge"><title>BB3&#45;&gt;BB6</title>
<path fill="none" stroke="black" d="M1029.33,-840.871C1011.1,-827.2 989.778,-811.209 969.831,-796.248"/>
<polygon fill="black" stroke="black" points="971.776,-793.332 961.676,-790.132 967.576,-798.932 971.776,-793.332"/>
<text text-anchor="middle" x="1008" y="-811.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB4&#45;&gt;BB2 -->
<g id="edge4" class="edge"><title>BB4&#45;&gt;BB2</title>
<path fill="none" stroke="black" d="M1529.5,-205.979C1529.5,-168.498 1529.5,-115.905 1529.5,-81.6449"/>
<polygon fill="black" stroke="black" points="1533,-81.2081 1529.5,-71.2081 1526,-81.2081 1533,-81.2081"/>
<text text-anchor="middle" x="1533" y="-113.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB5 -->
<g id="node6" class="node"><title>BB5</title>
<polygon fill="none" stroke="black" points="1057.5,-336 1057.5,-357 1199.5,-357 1199.5,-336 1057.5,-336"/>
<text text-anchor="start" x="1116" y="-343.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₅</text>
<polygon fill="none" stroke="black" points="1057.5,-315 1057.5,-336 1199.5,-336 1199.5,-315 1057.5,-315"/>
<text text-anchor="start" x="1060.5" y="-321.8" font-family="Times,serif" font-size="14.00">drop Var₃</text>
<polygon fill="none" stroke="black" points="1057.5,-294 1057.5,-315 1199.5,-315 1199.5,-294 1057.5,-294"/>
<text text-anchor="start" x="1060.5" y="-300.8" font-family="Times,serif" font-size="14.00">drop Temp₂</text>
<polygon fill="none" stroke="black" points="1057.5,-273 1057.5,-294 1199.5,-294 1199.5,-273 1057.5,-273"/>
<text text-anchor="start" x="1060.5" y="-279.8" font-family="Times,serif" font-size="14.00">drop Temp₃</text>
<polygon fill="none" stroke="black" points="1057.5,-252 1057.5,-273 1199.5,-273 1199.5,-252 1057.5,-252"/>
<text text-anchor="start" x="1060.5" y="-258.8" font-family="Times,serif" font-size="14.00">Temp₁₀ = Var₂</text>
<polygon fill="none" stroke="black" points="1057.5,-231 1057.5,-252 1199.5,-252 1199.5,-231 1057.5,-231"/>
<text text-anchor="start" x="1060.5" y="-237.8" font-family="Times,serif" font-size="14.00">Temp₁ = Temp₁₀</text>
<polygon fill="none" stroke="black" points="1057.5,-210 1057.5,-231 1199.5,-231 1199.5,-210 1057.5,-210"/>
<text text-anchor="start" x="1060.5" y="-216.8" font-family="Times,serif" font-size="14.00">drop Temp₁</text>
<polygon fill="none" stroke="black" points="1057.5,-189 1057.5,-210 1199.5,-210 1199.5,-189 1057.5,-189"/>
<text text-anchor="start" x="1060.5" y="-195.8" font-family="Times,serif" font-size="14.00">Temp₁₁ = Var₁</text>
<polygon fill="none" stroke="black" points="1057.5,-168 1057.5,-189 1199.5,-189 1199.5,-168 1057.5,-168"/>
<text text-anchor="start" x="1060.5" y="-174.8" font-family="Times,serif" font-size="14.00">ReturnPointer = Temp₁₁</text>
<polygon fill="cornsilk" stroke="none" points="1057.5,-147 1057.5,-168 1199.5,-168 1199.5,-147 1057.5,-147"/>
<polygon fill="none" stroke="black" points="1057.5,-147 1057.5,-168 1199.5,-168 1199.5,-147 1057.5,-147"/>
<text text-anchor="start" x="1060.5" y="-153.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₁</text>
</g>
<!-- BB5&#45;&gt;BB1 -->
<g id="edge5" class="edge"><title>BB5&#45;&gt;BB1</title>
<path fill="none" stroke="black" d="M1128.5,-142.728C1128.5,-120.458 1128.5,-98.5878 1128.5,-81.386"/>
<polygon fill="black" stroke="black" points="1132,-81.3169 1128.5,-71.3169 1125,-81.3169 1132,-81.3169"/>
<text text-anchor="middle" x="1132" y="-113.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB7 -->
<g id="node8" class="node"><title>BB7</title>
<polygon fill="none" stroke="black" points="873.5,-601 873.5,-622 1059.5,-622 1059.5,-601 873.5,-601"/>
<text text-anchor="start" x="954" y="-608.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₇</text>
<polygon fill="cornsilk" stroke="none" points="873.5,-580 873.5,-601 1059.5,-601 1059.5,-580 873.5,-580"/>
<polygon fill="none" stroke="black" points="873.5,-580 873.5,-601 1059.5,-601 1059.5,-580 873.5,-580"/>
<text text-anchor="start" x="876.5" y="-586.8" font-family="Times,serif" font-size="14.00">switch(Temp₅) &#45;&gt; [BB₁₁, BB₁₂]</text>
</g>
<!-- BB6&#45;&gt;BB7 -->
<g id="edge6" class="edge"><title>BB6&#45;&gt;BB7</title>
<path fill="none" stroke="black" d="M922.245,-697.999C931.61,-677.684 942.48,-654.104 951.104,-635.398"/>
<polygon fill="black" stroke="black" points="954.38,-636.65 955.388,-626.104 948.023,-633.72 954.38,-636.65"/>
<text text-anchor="middle" x="940" y="-668.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB8 -->
<g id="node9" class="node"><title>BB8</title>
<polygon fill="none" stroke="black" points="1363.5,-622 1363.5,-643 1438.5,-643 1438.5,-622 1363.5,-622"/>
<text text-anchor="start" x="1388.5" y="-629.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₈</text>
<polygon fill="none" stroke="black" points="1363.5,-601 1363.5,-622 1438.5,-622 1438.5,-601 1363.5,-601"/>
<text text-anchor="start" x="1366.5" y="-607.8" font-family="Times,serif" font-size="14.00">drop Temp₆</text>
<polygon fill="none" stroke="black" points="1363.5,-580 1363.5,-601 1438.5,-601 1438.5,-580 1363.5,-580"/>
<text text-anchor="start" x="1366.5" y="-586.8" font-family="Times,serif" font-size="14.00">drop Temp₇</text>
<polygon fill="cornsilk" stroke="none" points="1363.5,-559 1363.5,-580 1438.5,-580 1438.5,-559 1363.5,-559"/>
<polygon fill="none" stroke="black" points="1363.5,-559 1363.5,-580 1438.5,-580 1438.5,-559 1363.5,-559"/>
<text text-anchor="start" x="1366.5" y="-565.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₉</text>
</g>
<!-- BB6&#45;&gt;BB8 -->
<g id="edge7" class="edge"><title>BB6&#45;&gt;BB8</title>
<path fill="none" stroke="black" d="M1060.76,-697.999C1158.22,-670.46 1276.91,-636.922 1345.09,-617.657"/>
<polygon fill="black" stroke="black" points="1346.1,-621.009 1354.77,-614.921 1344.2,-614.272 1346.1,-621.009"/>
<text text-anchor="middle" x="1170" y="-668.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- BB11 -->
<g id="node12" class="node"><title>BB11</title>
<polygon fill="none" stroke="black" points="1062.5,-479 1062.5,-500 1137.5,-500 1137.5,-479 1062.5,-479"/>
<text text-anchor="start" x="1084.5" y="-486.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₁₁</text>
<polygon fill="none" stroke="black" points="1062.5,-458 1062.5,-479 1137.5,-479 1137.5,-458 1062.5,-458"/>
<text text-anchor="start" x="1065.5" y="-464.8" font-family="Times,serif" font-size="14.00">drop Temp₆</text>
<polygon fill="none" stroke="black" points="1062.5,-437 1062.5,-458 1137.5,-458 1137.5,-437 1062.5,-437"/>
<text text-anchor="start" x="1065.5" y="-443.8" font-family="Times,serif" font-size="14.00">drop Temp₇</text>
<polygon fill="cornsilk" stroke="none" points="1062.5,-416 1062.5,-437 1137.5,-437 1137.5,-416 1062.5,-416"/>
<polygon fill="none" stroke="black" points="1062.5,-416 1062.5,-437 1137.5,-437 1137.5,-416 1062.5,-416"/>
<text text-anchor="start" x="1065.5" y="-422.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₅</text>
</g>
<!-- BB7&#45;&gt;BB11 -->
<g id="edge8" class="edge"><title>BB7&#45;&gt;BB11</title>
<path fill="none" stroke="black" d="M989.364,-575.761C1005.98,-558.147 1029.1,-533.634 1049.87,-511.614"/>
<polygon fill="black" stroke="black" points="1052.5,-513.931 1056.81,-504.255 1047.4,-509.128 1052.5,-513.931"/>
<text text-anchor="middle" x="1041" y="-525.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB12 -->
<g id="node13" class="node"><title>BB12</title>
<polygon fill="none" stroke="black" points="888.5,-468 888.5,-489 1021.5,-489 1021.5,-468 888.5,-468"/>
<text text-anchor="start" x="939.5" y="-475.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₁₂</text>
<polygon fill="none" stroke="black" points="888.5,-447 888.5,-468 1021.5,-468 1021.5,-447 888.5,-447"/>
<text text-anchor="start" x="891.5" y="-453.8" font-family="Times,serif" font-size="14.00">Var₄ = (Temp₅ as 1).0</text>
<polygon fill="cornsilk" stroke="none" points="888.5,-426 888.5,-447 1021.5,-447 1021.5,-426 888.5,-426"/>
<polygon fill="none" stroke="black" points="888.5,-426 888.5,-447 1021.5,-447 1021.5,-426 888.5,-426"/>
<text text-anchor="start" x="891.5" y="-432.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₁₀</text>
</g>
<!-- BB7&#45;&gt;BB12 -->
<g id="edge9" class="edge"><title>BB7&#45;&gt;BB12</title>
<path fill="none" stroke="black" d="M964.437,-575.761C962.762,-556.076 960.353,-527.776 958.327,-503.968"/>
<polygon fill="black" stroke="black" points="961.792,-503.403 957.456,-493.736 954.817,-503.997 961.792,-503.403"/>
<text text-anchor="middle" x="965" y="-525.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- BB9 -->
<g id="node10" class="node"><title>BB9</title>
<polygon fill="none" stroke="black" points="1461.5,-468 1461.5,-489 1536.5,-489 1536.5,-468 1461.5,-468"/>
<text text-anchor="start" x="1486.5" y="-475.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₉</text>
<polygon fill="none" stroke="black" points="1461.5,-447 1461.5,-468 1536.5,-468 1536.5,-447 1461.5,-447"/>
<text text-anchor="start" x="1464.5" y="-453.8" font-family="Times,serif" font-size="14.00">drop Var₃</text>
<polygon fill="cornsilk" stroke="none" points="1461.5,-426 1461.5,-447 1536.5,-447 1536.5,-426 1461.5,-426"/>
<polygon fill="none" stroke="black" points="1461.5,-426 1461.5,-447 1536.5,-447 1536.5,-426 1461.5,-426"/>
<text text-anchor="start" x="1464.5" y="-432.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₄</text>
</g>
<!-- BB8&#45;&gt;BB9 -->
<g id="edge10" class="edge"><title>BB8&#45;&gt;BB9</title>
<path fill="none" stroke="black" d="M1431.78,-554.999C1443.51,-538.116 1456.81,-518.977 1468.44,-502.256"/>
<polygon fill="black" stroke="black" points="1471.51,-503.965 1474.34,-493.756 1465.76,-499.97 1471.51,-503.965"/>
<text text-anchor="middle" x="1456" y="-525.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB9&#45;&gt;BB4 -->
<g id="edge11" class="edge"><title>BB9&#45;&gt;BB4</title>
<path fill="none" stroke="black" d="M1503.76,-422.394C1508.51,-391.118 1515.59,-344.541 1521.12,-308.138"/>
<polygon fill="black" stroke="black" points="1524.6,-308.574 1522.64,-298.161 1517.67,-307.522 1524.6,-308.574"/>
<text text-anchor="middle" x="1514" y="-382.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB10 -->
<g id="node11" class="node"><title>BB10</title>
<polygon fill="none" stroke="black" points="873.5,-283 873.5,-304 1023.5,-304 1023.5,-283 873.5,-283"/>
<text text-anchor="start" x="933" y="-290.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₁₀</text>
<polygon fill="none" stroke="black" points="873.5,-262 873.5,-283 1023.5,-283 1023.5,-262 873.5,-262"/>
<text text-anchor="start" x="876.5" y="-268.8" font-family="Times,serif" font-size="14.00">Temp₉ = Var₄</text>
<polygon fill="none" stroke="black" points="873.5,-241 873.5,-262 1023.5,-262 1023.5,-241 873.5,-241"/>
<text text-anchor="start" x="876.5" y="-247.8" font-family="Times,serif" font-size="14.00">Var₁ = Mul(Var₁,Temp₉)</text>
<polygon fill="none" stroke="black" points="873.5,-220 873.5,-241 1023.5,-241 1023.5,-220 873.5,-220"/>
<text text-anchor="start" x="876.5" y="-226.8" font-family="Times,serif" font-size="14.00">drop Temp₈</text>
<polygon fill="cornsilk" stroke="none" points="873.5,-199 873.5,-220 1023.5,-220 1023.5,-199 873.5,-199"/>
<polygon fill="none" stroke="black" points="873.5,-199 873.5,-220 1023.5,-220 1023.5,-199 873.5,-199"/>
<text text-anchor="start" x="876.5" y="-205.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₁₃</text>
</g>
<!-- BB13 -->
<g id="node14" class="node"><title>BB13</title>
<polygon fill="none" stroke="black" points="828.5,-67 828.5,-88 903.5,-88 903.5,-67 828.5,-67"/>
<text text-anchor="start" x="850.5" y="-74.8" font-family="Times,serif" font-weight="bold" font-size="14.00">BB₁₃</text>
<polygon fill="none" stroke="black" points="828.5,-46 828.5,-67 903.5,-67 903.5,-46 828.5,-46"/>
<text text-anchor="start" x="831.5" y="-52.8" font-family="Times,serif" font-size="14.00">drop Temp₆</text>
<polygon fill="none" stroke="black" points="828.5,-25 828.5,-46 903.5,-46 903.5,-25 828.5,-25"/>
<text text-anchor="start" x="831.5" y="-31.8" font-family="Times,serif" font-size="14.00">drop Temp₇</text>
<polygon fill="cornsilk" stroke="none" points="828.5,-4 828.5,-25 903.5,-25 903.5,-4 828.5,-4"/>
<polygon fill="none" stroke="black" points="828.5,-4 828.5,-25 903.5,-25 903.5,-4 828.5,-4"/>
<text text-anchor="start" x="831.5" y="-10.8" font-family="Times,serif" font-size="14.00">goto &#45;&gt; BB₆</text>
</g>
<!-- BB10&#45;&gt;BB13 -->
<g id="edge12" class="edge"><title>BB10&#45;&gt;BB13</title>
<path fill="none" stroke="black" d="M925.82,-195.256C913.961,-166.109 899.501,-130.569 887.712,-101.593"/>
<polygon fill="black" stroke="black" points="890.835,-99.9807 883.824,-92.037 884.351,-102.619 890.835,-99.9807"/>
<text text-anchor="middle" x="901" y="-113.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB11&#45;&gt;BB5 -->
<g id="edge13" class="edge"><title>BB11&#45;&gt;BB5</title>
<path fill="none" stroke="black" d="M1105.9,-411.979C1107.65,-399.681 1109.63,-385.755 1111.67,-371.384"/>
<polygon fill="black" stroke="black" points="1115.15,-371.772 1113.09,-361.378 1108.22,-370.786 1115.15,-371.772"/>
<text text-anchor="middle" x="1115" y="-382.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB12&#45;&gt;BB10 -->
<g id="edge14" class="edge"><title>BB12&#45;&gt;BB10</title>
<path fill="none" stroke="black" d="M953.482,-422.394C952.648,-394.045 951.445,-353.125 950.43,-318.605"/>
<polygon fill="black" stroke="black" points="953.928,-318.481 950.135,-308.588 946.931,-318.687 953.928,-318.481"/>
<text text-anchor="middle" x="957" y="-382.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- BB13&#45;&gt;BB6 -->
<g id="edge15" class="edge"><title>BB13&#45;&gt;BB6</title>
<path fill="none" stroke="black" d="M855.707,-92.1299C847.633,-133.307 837.5,-195.947 837.5,-251 837.5,-602 837.5,-602 837.5,-602 837.5,-632.661 850.203,-663.988 864.29,-689.303"/>
<polygon fill="black" stroke="black" points="861.279,-691.087 869.313,-697.995 867.34,-687.585 861.279,-691.087"/>
<text text-anchor="middle" x="841" y="-454.3" font-family="Times,serif" font-size="14.00">0</text>
</g>
</g>
</svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#![feature(rustc_attrs)]
#![allow(dead_code)]
#[rustc_mir(graphviz = "empty.dot")]
fn empty() {}
#[rustc_mir(graphviz = "constant.dot")]
fn constant() -> i32 {
42
}
#[rustc_mir(graphviz = "increment.dot")]
fn increment(x: i32) -> i32 {
x + 1
}
#[rustc_mir(graphviz = "factorial_recursive.dot")]
fn factorial_recursive(n: usize) -> usize {
if n == 0 {
1
} else {
n * factorial_recursive(n - 1)
}
}
#[rustc_mir(graphviz = "factorial_iterative.dot")]
fn factorial_iterative(n: usize) -> usize {
let mut prod = 1;
for x in 1..n {
prod *= x;
}
prod
}
#[rustc_mir(graphviz = "factorial_fold.dot")]
fn factorial_fold(n: usize) -> usize {
(1..n).fold(1, |prod, x| prod * x)
}
#[rustc_mir(graphviz = "wat.dot")]
fn wat(n: usize) -> usize {
let mut prod = 1;
(1..n).fold((), |(), x| { prod *= x; });
prod
}
#[rustc_mir(graphviz = "multi_switch.dot")]
fn multi_switch(n: usize) -> usize {
match n {
5 | 10 | 15 => 3,
20 | 30 => 2,
_ => 1,
}
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment