ax, Qax

Tells the compiler to generate multiple, processor-specific auto-dispatch code paths for Intel processors if there is a performance benefit.

IDE Equivalent

Windows: Code Generation > Add Processor-Optimized Code Path

Linux: Code Generation > Add Processor-Optimized Code Path

Mac OS X: Code Generation > Add Processor-Optimized Code Path

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-axcode

Windows:

/Qaxcode

Arguments

code

Indicates the instructions to be generated for the set of processors in each description. The following descriptions refer to Intel® Streaming SIMD Extensions (Intel® SSE) and Supplemental Streaming SIMD Extensions (Intel® SSSE). Possible values are:

AVX

May generate Intel® Advanced Vector Extensions (Intel® AVX), SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions for Intel® processors.

SSE4.2

May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions for Intel processors.

SSE4.1

May generate Intel® SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions for Intel processors. This replaces value S, which is deprecated.

SSSE3

May generate Intel® SSSE3, SSE3, SSE2, and SSE instructions for Intel processors. For Mac OS* X systems, this value is only supported on Intel® 64 architecture. This replaces value T, which is deprecated.

SSE3

May generate Intel® SSE3, SSE2, and SSE instructions for Intel processors. For Mac OS* X systems, this value is only supported on IA-32 architecture. This replaces value P, which is deprecated.

SSE2

May generate Intel® SSE2 and SSE instructions for Intel processors. This value is not available on Mac OS* X systems. This replaces value N, which is deprecated.

Default

OFF

No auto-dispatch code is generated. Processor-specific code is generated and is controlled by the setting of compiler options -m and -x (Linux), compiler options /arch and /Qx (Windows), or compiler option -x (Mac OS* X).

Description

This option tells the compiler to generate multiple, processor-specific auto-dispatch code paths for Intel processors if there is a performance benefit. It also generates a baseline code path. The Intel processor-specific auto-dispatch path is usually more optimized than the baseline path. Other options, such as O3, control how much optimization is performed on the baseline path.

The baseline code path is determined by the architecture specified by options -m or -x (Linux and Mac OS X) or options /arch or /Qx (Windows). While there are defaults for the -x or /Qx option that depend on the operating system being used, you can specify an architecture and optimization level for the baseline code that is higher or lower than the default. The specified architecture becomes the effective minimum architecture for the baseline code path.

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

If you specify both the -ax and -m options (Linux) or the /Qax and /arch options (Windows), the baseline code will execute on non-Intel processors compatible with the processor type specified by the -m or /arch option.

The -ax and /Qax options tell 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 baseline version of the function. 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 processors and non-Intel processors. A non-Intel processor always executes the baseline code path.

You can use more than one of the processor values by combining them. For example, you can specify -axSSE4.1,SSSE3 (Linux and Mac OS X) or /QaxSSE4.1,SSSE3 (Windows). You cannot combine the old style, deprecated options and the new options. For example, you cannot specify -axSSE4.1,T (Linux and Mac OS X) or /QaxSSE4.1,T (Windows).

Previous values W and K are deprecated. The details on replacements are as follows:

Optimization Notice

Intel® Compiler includes compiler options that optimize for instruction sets that are available in both Intel® and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel® Compiler are reserved for Intel microprocessors. For a detailed description of these compiler options, including the instruction sets they implicate, please refer to "Intel® Compiler User and Reference Guides > Compiler Options". Many library routines that are part of Intel® Compiler are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel® Compiler offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

While the paragraph above describes the basic optimization approach for Intel® Compiler, with respect to Intel's compilers and associated libraries as a whole, Intel® Compiler may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel® SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

Intel recommends that you evaluate other compilers to determine which best meet your requirements.

Alternate Options

None

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.