| United States-English |
|
|
|
![]() |
Parallel Programming Guide for HP-UX Systems: K-Class and V-Class Servers > Chapter 4 Standard optimization featuresBlock level optimizations (+O1) |
|
At optimization level +O1, the compiler performs optimizations on a block level. The compiler continues to run the +O0 optimizations, with the following additions: Branch optimization involves traversing the procedure and transforming branch instruction sequences into more efficient sequences where possible. Examples of possible transformations are:
Conditional/unconditional branches The following Fortran example provides a transformation from a branch instruction to a more efficient sequence:
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 tasks:
A peephole optimization is a machine-dependent optimization that makes a pass through low-level assembly-like instruction sequences of the program. It applies patterns to a small window (peephole) of code looking for optimization opportunities. It performs the following optimizations:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||