The Intel compiler supports specific options to help optimize performance for specific Intel processors.
The -mtune (Linux*) or /G{n} (Windows*) option generates code that is backwards compatible with Intel® processors of the same family. This means that code generated with -mtune=pentium (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 -mtune=pentiumpro (Linux) or /G6 (Windows). Similarly, code generated with -mtune=itanium2 or -tpp2 (Linux) or /G2 (Windows) will run correctly on Itanium processor, but possibly not quite as fast as if it had been generated using -mtune=itanium or -tpp1 (Linux) or /G1 (Windows).
Mac OS*: The options listed in this topic are not supported.
The following options optimize application performance for a specific IA-32 or Intel® EM64T processor. The resulting binaries will also run correctly on any of the processors mentioned in the table.
Windows* |
Linux* |
Optimizes applications for... |
---|---|---|
/G5 |
-mtune=pentium -mtune=pentium-mmx -mcpu=pentium |
Intel® Pentium® and Pentium® with MMX™ technology processor |
/G6 |
-mtune=pentiumpro -mcpu=pentiumpro |
Intel® Pentium® Pro, Pentium® II and Pentium® III processors |
/G7 |
-mtune=pentium4 -mcpu=pentium4 |
Default. Intel® Pentium® 4 processors, Intel® Core™ Duo processors, Intel® Core™ Solo processors, Intel® Xeon® processors, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support Intel® EM64T:
|
For more information about the options listed in the table above, see the following topic:
mtune compiler option
The example commands shown 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, Pentium III, and more advanced processors.
The following examples demonstrate using the default options to target a processor:
Platform |
Example |
---|---|
Linux |
icc -mtune=pentium4 prog.cpp |
Windows |
icl /G7 prog.cpp |
The following options optimize application performance for an Itanium® processors.
Windows* |
Linux* |
Optimizes applications for... |
---|---|---|
/G1 |
-tpp1 -mtune=itanium -mcpu=itanium |
Intel® Itanium® processors |
/G2 |
-tpp2 -mtune=itanium2 -mcpu=itanium2 |
Default. Intel® Itanium® 2 processors |
/G2-p9000 |
-mtune=itanium2-p9000 -mcpu=itanium2-p9000 |
Dual-Core Intel® Itanium® 2 Processor 9000 Sequence processors |
For more information about the options listed in the table above, see the following topic:
mtune, tpp1,tpp2,G1,G2, mcpu compiler options
The following examples demonstrate using the default options to target an Itanium® 2 processor. The same binary will also run on Itanium processors.
Platform |
Example |
---|---|
Linux |
icpc -mtune=itanium2 prog.cpp |
Windows |
icl /G2 prog.cpp |