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.

v<br />

-qcache=auto<br />

Optimization level -O5 includes:<br />

v Everything from -O4<br />

v -qipa=level=2<br />

If -O5 is specified on the compile step, then it should be specified on the link step,<br />

as well. Although the -qipa option is not strictly another optimization level, it<br />

extends the optimizations across procedures (even if the procedures are in different<br />

files). It enhances the effectiveness of the optimizations that are done by other<br />

optimization options, particularly -O (at any level) and -Q. Because it can also<br />

increase compile time substantially, you may want to use it primarily <strong>for</strong> tuning<br />

applications that are already debugged and ready to be used. If your application<br />

contains a mixture of <strong>Fortran</strong> and C or C++ code compiled with <strong>IBM</strong> <strong>XL</strong> C/C+<br />

compilers, you can achieve additional optimization by compiling and linking all<br />

your code with the -O5 option.<br />

Optimizing <strong>for</strong> a Target Machine or Class of Machines<br />

Target machine options are options that instruct the compiler to generate code <strong>for</strong><br />

optimal execution on a given processor or architecture family. By default, the<br />

compiler generates code that runs on all supported systems, but perhaps<br />

suboptimally on a given system. By selecting appropriate target machine options,<br />

you can optimize your application to suit the broadest possible selection of target<br />

processors, a range of processors within a given family, or a specific processor. The<br />

following compiler options control optimizations affecting individual aspects of the<br />

target machine.<br />

Target machine options<br />

Option<br />

Behavior<br />

-q32 Generates code <strong>for</strong> a 32-bit addressing model (32-bit execution<br />

mode).<br />

-q64 Generates code <strong>for</strong> a 64-bit addressing model (64-bit execution<br />

mode).<br />

-qarch<br />

-qtune<br />

-qcache<br />

Selects a family of processor architectures, or a specific architecture,<br />

<strong>for</strong> which instruction code should be generated.<br />

Biases optimization toward execution on a given processor, without<br />

implying anything about the instruction set architecture to use as a<br />

target.<br />

Defines a specific cache or memory geometry. The defaults are set<br />

through -qtune.<br />

Selecting a predefined optimization level sets default values <strong>for</strong> these individual<br />

options.<br />

Related In<strong>for</strong>mation: See “-qarch Option” on page 127, “-qtune Option” on page<br />

251, “-qcache Option” on page 137, and “Compiling <strong>for</strong><br />

Specific Architectures” on page 39.<br />

Getting the Most out of Target Machine Options<br />

Try to specify with -qarch the smallest family of machines possible that will be<br />

expected to run your code reasonably well.<br />

310 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!