Download - Oracle Documentation

Transcript
Annotated Source Code
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
Function wtime_ not inlined because the compiler has not seen
the body of the routine
Discovered loop below has tag L16
39.
DO WHILE(wtime() < tmrend)
Array statement below generated loop L4
40.
a(1:m) = 0.0
41.
Source loop below has tag L6
42.
DO j = 1, n
! <=-----\ swapped loop indices
Source loop below has tag L5
L5 cloned for unrolling-epilog. Clone is L19
All 8 copies of L19 are fused together as part of unroll and jam
L19 scheduled with steady-state cycle count = 9
L19 unrolled 4 times
L19 has 9 loads, 1 stores, 8 prefetches, 8 FPadds,
8 FPmuls, and 0 FPdivs per iteration
L19 has 0 int-loads, 0 int-stores, 11 alu-ops, 0 muls,
0 int-divs and 0 shifts per iteration
L5 scheduled with steady-state cycle count = 2
L5 unrolled 4 times
L5 has 2 loads, 1 stores, 1 prefetches, 1 FPadds, 1 FPmuls,
and 0 FPdivs per iteration
L5 has 0 int-loads, 0 int-stores, 4 alu-ops, 0 muls,
0 int-divs and 0 shifts per iteration
0.210 0.210 0.210 0.
43.
DO i = 1, m
4.003 4.003 4.003 0.050 44.
a(i) = a(i) + b(i,j) * c(j)
0.240 0.240 0.240 0.
45.
END DO
0.
0.
0.
0.
46.
END DO
47.
END DO
48.
0.
0.
0.
0.
49.
RETURN
0.
0.
0.
0.
50.
END
You can set the types of compiler commentary displayed in the Source view using
the Source/Disassembly tab in the Settings dialog box; for details, see “Configuration
Settings” on page 126.
Common Subexpression Elimination
One very common optimization recognizes that the same expression appears in more than one
place, and that performance can be improved by generating the code for that expression in one
place. For example, if the same operation appears in both the if and the else branches of a
block of code, the compiler can move that operation to just before the if statement. When it
does so, it assigns line numbers to the instructions based on one of the previous occurrences of
the expression. If the line numbers assigned to the common code correspond to one branch of
an if structure and the code actually always takes the other branch, the annotated source shows
metrics on lines within the branch that is not taken.
Chapter 7 • Understanding Annotated Source and Disassembly Data
215