ax, Qax

Directs the compiler to generate processor-specific code if there is a performance benefit, while also generating generic IA-32 code.

IDE Equivalent

Windows: Optimization > Use Intel(R) Processor Extensions
Linux: None

Architectures

IA-32, IntelŪ EM64T

Syntax

Linux: -axprocessor
Windows:  /Qaxprocessor

Arguments

processor     Is the processor for which you want to target your program. Possible values are:
  K Code is optimized for IntelŪ PentiumŪ III and compatible Intel processors.
  W Code is optimized for Intel Pentium 4 and compatible Intel processors.
  N Code is optimized for Intel Pentium 4 and compatible Intel processors.
This option also enables new optimizations in addition to Intel processor-specific optimizations.
  B Code is optimized for Intel Pentium M and compatible Intel processors.
This option also enables new optimizations in addition to Intel processor-specific optimizations.
  P Code is optimized for IntelŪ PentiumŪ 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support.
This option also enables new optimizations in addition to Intel processor-specific optimizations.

Default

OFF No processor-specific code is generated by the compiler.

Description

This option directs the compiler to generate processor-specific code if there is a performance benefit, while also generating generic IA-32 code. The generic code is usually slower than the specialized code.

It enables the vectorizer and tells the compiler to find opportunities to generate separate versions of functions that take advantage of features of 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.

On IntelŪ EM64T systems, W and P are the only valid processor values.

You can use more than one of the processor values by combining them. For example, you can specify -axNB (Linux) or /QaxNB (Windows) to generate code for IntelŪ PentiumŪ 4 processors and Intel Pentium M processors.

If you specify both the -ax and -x options (Linux) or the /Qax and /Qx options (Windows), the generic code will only execute on processors compatible with the processor type specified by the -x or /Qx option.

Alternate Options

None

See Also

x compiler option