Targeting a Processor

The -tpp{n} (Linux*) or /G{n} (Windows*) option optimizes your application's performance for specific Intel processors. This option generates code that is tuned for the processor associated with its version. For example:

The -tpp{n} (Linux) or /G{n} (Windows) option always generates code that is backwards compatible with Intel® processors of the same family. This means that code generated with -tpp7 (Linux) or /G7 (Windows) will run correctly on Pentium Pro or Pentium III processors, possibly just not quite as fast as if the code had been compiled with -tpp6 (Linux) or /G6 (Windows). Similarly, code generated with -tpp2 (Linux) or /G2 (Windows) will run correctly on Itanium processor, but possibly not quite as fast as if it had been generated with -tpp1 (Linux) or /G1 (Windows).

Options for IA-32 Processors

The -tpp5, -tpp6, and -tpp7 (Linux) or /G5, /G6, and /G7 (Windows) options optimize your application's performance for a specific Intel® IA-32 processor.

Note

Linux Only: The Intel® compiler includes gcc*-compatible versions of the -tpp options. These options are listed in the Optimizes applications for column (below).

The resulting binaries will also run correctly on any of the processors mentioned in the table.

Windows*

Linux*

Optimizes applications for...

/G5

-tpp5

Intel® Pentium® and Pentium® with MMX™ technology processor

  • Linux: gcc* Version: -mcpu=pentium

/G6

-tpp6

Intel® Pentium® Pro, Pentium® II and Pentium® III processors

  • Linux: gcc* Version: -mcpu=pentiumpro

/G7

-tpp7

 

Intel® Pentium® 4, Intel® Xeon™, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support

  • Linux: gcc* Version: -mcpu=pentiumpro

For more information about the options listed in the table above, see the following topic:

The invocations listed below each result in a compiled binary of the source program prog.cpp optimized for Pentium 4 and Intel® Xeon™ processors by default. The same binary will also run on Pentium, Pentium Pro, Pentium II, and Pentium III processors.

The following examples demonstrate using the default options to target a processor:

Platform

Example

Linux

icpc prog.cpp

is the same as

icpc -tpp7 prog.cpp

is the same as

icpc -mcpu=pentiumpro prog.cpp

Windows

icl prog.cpp

is the same as

icl /G7 prog.cpp

Options for Itanium® Processors

The -tpp1 and -tpp2 (Linux) or /G1 and /G2 (Windows) options optimize your application's performance for an Itanium® processor.

Windows*

Linux*

Optimizes applications for...

/G1

-tpp1

Intel® Itanium® processors

  • Linux: gcc* Version: -mcpu=itanium

/G2

-tpp2

Intel® Itanium® 2 processors

  • Linux: gcc* Version: -mcpu=itanium2

For more information about the options listed in the table above, see the following topic:

The following invocation results in a compiled binary of the source program optimized for the Itanium® 2 processor by default. The same binary will also run on Itanium processors:

Platform

Example

Linux

icpc prog.cpp

is the same as

icpc -tpp2 prog.cpp

is the same as

icpc -mcpu=itanium2 prog.cpp

Windows

icl prog.cpp

is the same as

icl /G2 prog.cpp