1 |
|
|
|
2 |
|
|
|
|
|
inline |
bar will not be inlined into foo because its definition is unavailable |
foo |
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
void Test(int *res, int *c, int *d, int *p, int n) { |
7 |
|
|
|
8 |
|
|
|
9 |
|
|
#pragma clang loop vectorize(assume_safety) |
10 |
|
|
for (i = 0; i < 1600; i++) { |
|
|
loop-vectorize |
vectorized loop (vectorization width: 4, interleaved count: 2) |
Test |
11 |
|
|
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
for (i = 0; i < 16; i++) { |
|
|
loop-unroll |
completely unrolled loop with 16 iterations |
Test |
15 |
|
|
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; |
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
|
|
inline |
foo can be inlined into Test with cost=30 (threshold=412) |
Test |
|
|
inline |
foo inlined into Test |
Test |
19 |
|
|
|
20 |
|
|
|
|
|
inline |
bar will not be inlined into Test because its definition is unavailable |
Test |
|
|
inline |
foo can be inlined into Test with cost=30 (threshold=412) |
Test |
|
|
inline |
foo inlined into Test |
Test |
|
|
inline |
foo can be inlined into Test with cost=30 (threshold=412) |
Test |
|
|
inline |
foo inlined into Test |
Test |
21 |
|
|
|
22 |
|
|
|