| United States-English |
|
|
|
![]() |
Fortran 90, Fortran 77, C, aC++: Exemplar Programming Guide > Chapter 3 Compiler optimizations+O1 level optimizations |
|
At optimization level +O1, the compiler performs optimizations on a block level. The compiler also continues to perform the optimizations performed at +O0. The +O1 optimizations are: The branch optimization involves traversing the procedure and transforming branch instruction sequences into more efficient sequences where possible. Examples of possible transformations are:
becomes:
Dead code elimination removes unreachable code that is never executed. For example, in C:
becomes:
Faster register allocation involves:
Faster register allocation, when used at +O0 or +O1, analyzes register use faster than the global register allocation performed at +O2. The instruction scheduler optimization performs the following:
A peephole optimization is a machine-dependent optimization that makes a pass through low-level assembly-like instruction sequences of the program, applying patterns to a small window (peephole) of code looking for optimization opportunities. The optimizations performed are:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||