Line Hotness Optimization Source Inline Context
1
void bar();
2
void foo() { bar(); }
inline
             
bar will not be inlined into foo because its definition is unavailable 
foo
3
4
#include "or.h"
5
6
void Test(int *res, int *c, int *d, int *p, int n) {
7
  int i;
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
  foo();
inline
  
foo can be inlined into Test with cost=30 (threshold=412) 
Test
inline
  
foo inlined into Test 
Test
19
20
  foo(); bar(); foo();
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