G5, G6, G7

Optimize application performance for systems using IA-32 architecture and Intel® 64 architecture. These are deprecated options.

IDE Equivalent

Windows: Optimization > Optimize for Processor

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

None

Windows:

/G5

/G6

/G7

Arguments

None

Default

/G7

On systems using IA-32 architecture and Intel® 64 architecture, performance is optimized for Intel® Pentium® 4 processors, Intel® Xeon® processors, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support.

Description

These options optimize application performance for a particular Intel® processor or family of processors. The compiler generates code that takes advantage of features of the specified processor.

Option

Description

G5

Optimizes for Intel® Pentium® and Pentium® with MMX™ technology processors.

G6

Optimizes for Intel® Pentium® Pro, Pentium® II and Pentium® III processors.

G7

Optimizes for Intel® Core™ Duo processors, Intel® Core™ Solo processors, Intel® Pentium® 4 processors, Intel® Xeon® processors based on the Intel® Core microarchitecture, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3) instruction support.

On systems using Intel® 64 architecture, only option G7 is valid.

These options always generate code that is backwards compatible with Intel processors of the same architecture. For example, code generated with the G7 option runs correctly on Pentium III processors, although performance may be faster on Pentium III processors when compiled using or G6.

Alternate Options

Windows: /GB (an alternate for /G6; this option is also deprecated)

Linux: None

Example

In the following example, the compiled binary of the source program prog.c is optimized, by default, for Intel® Pentium® 4 processors, Intel® Xeon® processors, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3). The same binary will also run on Pentium, Pentium Pro, Pentium II, and Pentium III processors. All lines in the code example are equivalent.

icl prog.c

icl /G7 prog.c

In the following example, the compiled binary is optimized for Pentium processors and Pentium processors with MMX technology:

ifort /G5 prog.f

icl /G5 prog.c

See Also