Note on dependency depth: Dependency depth is defined as the number of dependent
instructions that need to execute sequentially.
Consider this example:
for (i=0; i<1000; i++) result[i] = sqrtf(arrayOne[i]) + sqrtf(arrayTwo[i]);In each iteration of the outermost loop, there exists a chain of dependent instructions that need to execute sequentially. These are:
ilp2048
This feature is a measure of the Instruction Level Parallelism available in a region of code.
ilp2048 looks at the number of iterations of a loop that fit in a window of 2048 instructions.
Classifying ilp2048:
ilp2048 can be classified into low, medium or high as follows:
For a loop with < 2018 instructions in each iteration,
Bucket | Condition |
---|---|
Low | The number of operations in each iteration of the loop is <50
OR
The dependency depth is about 40.
|
Medium |
The number of operations in each iteration of the loop is > 50 & < 150
& the dependency depth is about 10.
OR
The dependency depth is between 20 & 40.
|
High | The number of operations in each iteration of the loop is > 150 & a the dependency depth is about 10. |
Example 1:
Consider the following code:
for (i=0; i<1000; i++) result[i] = sqrtf(arrayOne[i]) + sqrtf(arrayTwo[i]);The number of operations in this loop is about 12. Therefore, ilp2048 can be estimated to be low.
Example 2:
Consider another example:
for (i=0; i<1000; i++){ for (j=0; j<50; j++){ var1 += arrayOne[i]*smallArray[j]; } result[i] = var1; }The number of operations in each iteration of the innermost loop is about 5. Therefore, the total number of operations due to the innermost loop is: