blob: 1233dfb5bab1f3080cf8fc94995ffe0a04dc98e6 [file] [log] [blame]
<!DOCTYPE html>
<!--
Preview this file as rendered HTML from the github source at:
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.simple_loop/simple_loop.main.-------.InstrumentCoverage.0.html
For revisions in Pull Requests (PR):
* Replace "rust-lang" with the github PR author
* Replace "master" with the PR branch name
-->
<html>
<head>
<title>simple_loop.main - Coverage Spans</title>
<style>
.line {
counter-increment: line;
}
.line:before {
content: counter(line) ": ";
font-family: Menlo, Monaco, monospace;
font-style: italic;
width: 3.8em;
display: inline-block;
text-align: right;
filter: opacity(50%);
-webkit-user-select: none;
}
.code {
color: #dddddd;
background-color: #222222;
font-family: Menlo, Monaco, monospace;
line-height: 1.4em;
border-bottom: 2px solid #222222;
white-space: pre;
display: inline-block;
}
.odd {
background-color: #55bbff;
color: #223311;
}
.even {
background-color: #ee7756;
color: #551133;
}
.code {
--index: calc(var(--layer) - 1);
padding-top: calc(var(--index) * 0.15em);
filter:
hue-rotate(calc(var(--index) * 25deg))
saturate(calc(100% - (var(--index) * 2%)))
brightness(calc(100% - (var(--index) * 1.5%)));
}
.annotation {
color: #4444ff;
font-family: monospace;
font-style: italic;
display: none;
-webkit-user-select: none;
}
body:active .annotation {
/* requires holding mouse down anywhere on the page */
display: inline-block;
}
span:hover .annotation {
/* requires hover over a span ONLY on its first line */
display: inline-block;
}
</style>
</head>
<body>
<div class="code" style="counter-reset: line 2"><span class="line"><span><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"><span class="annotation">@0,1,2,3⦊</span>fn main() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> // Initialize test constants in a way that cannot be determined at compile time, to ensure</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> // dependent conditions.</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> let is_true = std::env::args().len() == 1;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> let mut countdown = 0;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> if</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="7:19-7:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb15]
7:19-7:35: @1[0]: _3 = &amp;_4
7:19-7:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb14]
7:19-7:46: @2[1]: _1 = Eq(move _2, const 1_usize)
7:9-7:16: @2[3]: FakeRead(ForLet, _1)
9:25-9:26: @3[2]: _5 = const 0_i32
9:9-9:22: @3[3]: FakeRead(ForLet, _5)
12:9-12:16: @3[6]: _7 = _1
12:9-12:16: @3[7]: FakeRead(ForMatchedPlace, _7)"> is_true<span class="annotation">⦉@0,1,2,3</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"><span class="annotation">@4,6⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"> countdown</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"> =</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"> 10</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"> ;</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:9-16:15: @6[0]: _5 = const 10_i32
13:5-18:6: @6[1]: _6 = const ()"> }<span class="annotation">⦉@4,6</span></span></span><span><span class="code even" style="--layer: 1" title="18:6-18:6: @5[0]: _6 = const ()"><span class="annotation">@5⦊</span><span class="annotation">⦉@5</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> loop</span></span>
<span class="line"><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> if</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="23:13-23:22: @9[3]: _11 = _5
23:13-25:14: @9[4]: _10 = Eq(move _11, const 0_i32)
23:13-25:14: @9[6]: FakeRead(ForMatchedPlace, _10)"><span class="annotation">@8,9⦊</span>countdown</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="23:13-23:22: @9[3]: _11 = _5
23:13-25:14: @9[4]: _10 = Eq(move _11, const 0_i32)
23:13-25:14: @9[6]: FakeRead(ForMatchedPlace, _10)"> ==</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="23:13-23:22: @9[3]: _11 = _5
23:13-25:14: @9[4]: _10 = Eq(move _11, const 0_i32)
23:13-25:14: @9[6]: FakeRead(ForMatchedPlace, _10)"> 0<span class="annotation">⦉@8,9</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="27:13-27:18: @12[0]: _0 = const ()"><span class="annotation">@10,12⦊</span>break<span class="annotation">⦉@10,12</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> ;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code odd" style="--layer: 1" title="29:10-29:10: @11[0]: _9 = const ()
30:9-32:10: @11[3]: _13 = CheckedSub(_5, const 1_i32)
30:9-32:10: @13[0]: _5 = move (_13.0: i32)"><span class="annotation">@11,13⦊</span></span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="29:10-29:10: @11[0]: _9 = const ()
30:9-32:10: @11[3]: _13 = CheckedSub(_5, const 1_i32)
30:9-32:10: @13[0]: _5 = move (_13.0: i32)"> countdown</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="29:10-29:10: @11[0]: _9 = const ()
30:9-32:10: @11[3]: _13 = CheckedSub(_5, const 1_i32)
30:9-32:10: @13[0]: _5 = move (_13.0: i32)"> -=</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="29:10-29:10: @11[0]: _9 = const ()
30:9-32:10: @11[3]: _13 = CheckedSub(_5, const 1_i32)
30:9-32:10: @13[0]: _5 = move (_13.0: i32)"> 1<span class="annotation">⦉@11,13</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> ;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code even" style="--layer: 1" title="35:2-35:2: @12.Return: return"><span class="annotation">@10,12⦊</span><span class="annotation">⦉@10,12</span></span></span></span></div>
</body>
</html>