Automatic Processor-specific Optimization (IA-32 only)

The -ax{K|W|N|B|P} options direct the compiler to find opportunities to generate separate versions of functions that take advantage of features that are specific to the specified Intel processor. If the compiler finds such an opportunity, it first checks whether generating a processor-specific version of a function is likely to result in a performance gain. If this is the case, the compiler generates both a processor-specific version of a function and a generic version of the function. The generic version will run on any IA-32 processor.

At run time, one of the versions is chosen to execute, depending on the Intel processor in use. In this way, the program can benefit from performance gains on more advanced Intel processors, while still working properly on older IA-32 processors.

The disadvantages of using -ax{K|W|N|B|P} are:

Note
Applications that you compile to optimize themselves for specific processors in this way will execute on any Intel IA-32  processor. If you specify both the -x and -ax options, the -x option forces the generic code to execute only on processors compatible with the processor type specified by the -x option.

Option

Optimizes Your Code for...

-axK

IntelŪ PentiumŪ III and compatible Intel processors.

-axW

Intel Pentium 4 and compatible Intel processors.

-axN

Intel Pentium 4 and compatible Intel processors. This option also enables new optimizations in addition to Intel processor-specific optimizations.

-axB

Intel Pentium M and compatible Intel processors. This option also enables new optimizations in addition to Intel processor-specific optimizations.

-axP

Intel processors code-named "Prescott." This option also enables new optimizations in addition to Intel processor-specific optimizations.

Example

The compilation below generates a single executable that includes:

ifort -axKW prog.f90