• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2<html>
3<title>or.c</title>
4<meta charset="utf-8" />
5<head>
6<link rel='stylesheet' type='text/css' href='style.css'>
7</head>
8<body>
9<div class="centered">
10<table class="source">
11<thead>
12<tr>
13<th style="width: 2%">Line</td>
14<th style="width: 3%">Hotness</td>
15<th style="width: 10%">Optimization</td>
16<th style="width: 70%">Source</td>
17<th style="width: 15%">Inline Context</td>
18</tr>
19</thead>
20<tbody>
21
22<tr>
23<td><a name="L1">1</a></td>
24<td></td>
25<td></td>
26<td><div class="highlight"><pre>void bar();</pre></div></td>
27</tr>
28
29<tr>
30<td><a name="L2">2</a></td>
31<td></td>
32<td></td>
33<td><div class="highlight"><pre>void foo() { bar(); }</pre></div></td>
34</tr>
35
36<tr>
37<td></td>
38<td></td>
39<td class="column-entry-red">inline</td>
40<td><pre style="display:inline">             </pre><span class="column-entry-yellow"> bar will not be inlined into foo because its definition is unavailable&nbsp;</span></td>
41<td class="column-entry-yellow">foo</td>
42</tr>
43
44<tr>
45<td><a name="L3">3</a></td>
46<td></td>
47<td></td>
48<td><div class="highlight"><pre></pre></div></td>
49</tr>
50
51<tr>
52<td><a name="L4">4</a></td>
53<td></td>
54<td></td>
55<td><div class="highlight"><pre>#include "or.h"</pre></div></td>
56</tr>
57
58<tr>
59<td><a name="L5">5</a></td>
60<td></td>
61<td></td>
62<td><div class="highlight"><pre></pre></div></td>
63</tr>
64
65<tr>
66<td><a name="L6">6</a></td>
67<td></td>
68<td></td>
69<td><div class="highlight"><pre>void Test(int *res, int *c, int *d, int *p, int n) {</pre></div></td>
70</tr>
71
72<tr>
73<td><a name="L7">7</a></td>
74<td></td>
75<td></td>
76<td><div class="highlight"><pre>  int i;</pre></div></td>
77</tr>
78
79<tr>
80<td><a name="L8">8</a></td>
81<td></td>
82<td></td>
83<td><div class="highlight"><pre></pre></div></td>
84</tr>
85
86<tr>
87<td><a name="L9">9</a></td>
88<td></td>
89<td></td>
90<td><div class="highlight"><pre>#pragma clang loop vectorize(assume_safety)</pre></div></td>
91</tr>
92
93<tr>
94<td><a name="L10">10</a></td>
95<td></td>
96<td></td>
97<td><div class="highlight"><pre>  for (i = 0; i < 1600; i++) {</pre></div></td>
98</tr>
99
100<tr>
101<td></td>
102<td></td>
103<td class="column-entry-green">loop-vectorize</td>
104<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> vectorized loop (vectorization width: 4, interleaved count: 2)&nbsp;</span></td>
105<td class="column-entry-yellow">Test</td>
106</tr>
107
108<tr>
109<td><a name="L11">11</a></td>
110<td></td>
111<td></td>
112<td><div class="highlight"><pre>    res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];</pre></div></td>
113</tr>
114
115<tr>
116<td><a name="L12">12</a></td>
117<td></td>
118<td></td>
119<td><div class="highlight"><pre>  }</pre></div></td>
120</tr>
121
122<tr>
123<td><a name="L13">13</a></td>
124<td></td>
125<td></td>
126<td><div class="highlight"><pre></pre></div></td>
127</tr>
128
129<tr>
130<td><a name="L14">14</a></td>
131<td></td>
132<td></td>
133<td><div class="highlight"><pre>  for (i = 0; i < 16; i++) {</pre></div></td>
134</tr>
135
136<tr>
137<td></td>
138<td></td>
139<td class="column-entry-green">loop-unroll</td>
140<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> completely unrolled loop with 16 iterations&nbsp;</span></td>
141<td class="column-entry-yellow">Test</td>
142</tr>
143
144<tr>
145<td><a name="L15">15</a></td>
146<td></td>
147<td></td>
148<td><div class="highlight"><pre>    res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];</pre></div></td>
149</tr>
150
151<tr>
152<td><a name="L16">16</a></td>
153<td></td>
154<td></td>
155<td><div class="highlight"><pre>  }</pre></div></td>
156</tr>
157
158<tr>
159<td><a name="L17">17</a></td>
160<td></td>
161<td></td>
162<td><div class="highlight"><pre></pre></div></td>
163</tr>
164
165<tr>
166<td><a name="L18">18</a></td>
167<td></td>
168<td></td>
169<td><div class="highlight"><pre>  foo();</pre></div></td>
170</tr>
171
172<tr>
173<td></td>
174<td></td>
175<td class="column-entry-white">inline</td>
176<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> foo can be inlined into Test with cost=30 (threshold=412)&nbsp;</span></td>
177<td class="column-entry-yellow">Test</td>
178</tr>
179
180<tr>
181<td></td>
182<td></td>
183<td class="column-entry-green">inline</td>
184<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> foo inlined into Test&nbsp;</span></td>
185<td class="column-entry-yellow">Test</td>
186</tr>
187
188<tr>
189<td><a name="L19">19</a></td>
190<td></td>
191<td></td>
192<td><div class="highlight"><pre></pre></div></td>
193</tr>
194
195<tr>
196<td><a name="L20">20</a></td>
197<td></td>
198<td></td>
199<td><div class="highlight"><pre>  foo(); bar(); foo();</pre></div></td>
200</tr>
201
202<tr>
203<td></td>
204<td></td>
205<td class="column-entry-red">inline</td>
206<td><pre style="display:inline">         </pre><span class="column-entry-yellow"> bar will not be inlined into Test because its definition is unavailable&nbsp;</span></td>
207<td class="column-entry-yellow">Test</td>
208</tr>
209
210<tr>
211<td></td>
212<td></td>
213<td class="column-entry-white">inline</td>
214<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> foo can be inlined into Test with cost=30 (threshold=412)&nbsp;</span></td>
215<td class="column-entry-yellow">Test</td>
216</tr>
217
218<tr>
219<td></td>
220<td></td>
221<td class="column-entry-green">inline</td>
222<td><pre style="display:inline">  </pre><span class="column-entry-yellow"> foo inlined into Test&nbsp;</span></td>
223<td class="column-entry-yellow">Test</td>
224</tr>
225
226<tr>
227<td></td>
228<td></td>
229<td class="column-entry-white">inline</td>
230<td><pre style="display:inline">                </pre><span class="column-entry-yellow"> foo can be inlined into Test with cost=30 (threshold=412)&nbsp;</span></td>
231<td class="column-entry-yellow">Test</td>
232</tr>
233
234<tr>
235<td></td>
236<td></td>
237<td class="column-entry-green">inline</td>
238<td><pre style="display:inline">                </pre><span class="column-entry-yellow"> foo inlined into Test&nbsp;</span></td>
239<td class="column-entry-yellow">Test</td>
240</tr>
241
242<tr>
243<td><a name="L21">21</a></td>
244<td></td>
245<td></td>
246<td><div class="highlight"><pre>}</pre></div></td>
247</tr>
248
249<tr>
250<td><a name="L22">22</a></td>
251<td></td>
252<td></td>
253<td><div class="highlight"><pre></pre></div></td>
254</tr>
255
256</tbody>
257</table>
258</body>
259</html>
260