24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

-O5 Provides all of the functionality of the -O4 option, but also provides the<br />

functionality of the -qipa=level=2 option.<br />

Note: Combining -O2 and higher optimizations with -qsmp=omp invokes<br />

additional optimization algorithms, including interprocedural analysis (IPA).<br />

IPA optimizations provide opportunities <strong>for</strong> the compiler to generate<br />

additional fmadd instructions.<br />

To obtain the same floating-point accuracy <strong>for</strong> optimized and non-optimized<br />

applications, you must specify the -qfloat=nomaf compiler option. In cases<br />

where differences in floating-point accuracy still occur after specifying<br />

-qfloat=nomaf, the -qstrict compiler option allows you to exert greater<br />

control over changes that optimization can cause in floating-point semantics.<br />

Restrictions<br />

Generally, use the same optimization level <strong>for</strong> both the compile and link steps. This<br />

is important when using either the -O4 or -O5 optimization level to get the best<br />

run-time per<strong>for</strong>mance. For the -O5 level, all loop trans<strong>for</strong>mations (as specified via<br />

the -qhot option) are done at the link step.<br />

Increasing the level of optimization may or may not result in additional<br />

per<strong>for</strong>mance improvements, depending on whether the additional analysis detects<br />

any further optimization opportunities.<br />

An optimization level of -O3 or higher can change the behavior of the program<br />

and potentially cause exceptions that would not otherwise occur. Use of the<br />

-qstrict option can eliminate potential changes and exceptions.<br />

If the -O option is used in an @PROCESS statement, only an optimization level of<br />

0, 2, or 3 is allowed.<br />

Compilations with optimization may require more time and machine resources<br />

than other compilations.<br />

The more the compiler optimizes a program, the more difficult it is to debug the<br />

program with a symbolic debugger.<br />

Related In<strong>for</strong>mation<br />

“-qessl Option” on page 155 allows the use of ESSL routines.<br />

“-qstrict Option” on page 241 shows how to turn off the effects of -O3 that might<br />

change the semantics of a program.<br />

“-qipa Option” on page 182, “-qhot Option” on page 171, and “-qpdf Option” on<br />

page 210 turn on additional optimizations that may improve per<strong>for</strong>mance <strong>for</strong> some<br />

programs.<br />

“Optimizing <strong>XL</strong> <strong>Fortran</strong> Programs” on page 305 discusses technical details of the<br />

optimization techniques the compiler uses and some strategies you can use to get<br />

maximum per<strong>for</strong>mance from your code.<br />

-qOPTimize is the long <strong>for</strong>m of -O.<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!