G1, G2, G2-p9000

Optimizes application performance for systems using IA-64 architecture.

IDE Equivalent

Windows: Optimization > Optimize For IntelŪ Processor
Linux: None
Mac OS X: None

Architectures

IA-64 architecture

Syntax

Linux: None
Mac OS X: None
Windows:  /G1
/G2
/G2-p9000

Arguments

None

Default

/G2 Performance is optimized for systems using IA-64 architecture.

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 IA-64 architecture.

Option Description
G1 Optimizes for processors using IA-64 architecture.
G2 Optimizes for IntelŪ ItaniumŪ 2 processors.
G2-p9000 Optimizes for Dual-Core IntelŪ ItaniumŪ 2 processor 9000 series. This option affects the order of the generated instructions, but the generated instructions are limited to IntelŪ ItaniumŪ 2 processor instructions unless the program uses (executes) intrinsics specific to the Dual-Core IntelŪ ItaniumŪ 2 processor 9000 series.

These options always generate code that is backwards compatible with Intel processors of the same architecture. For example, code generated with option G2 runs correctly on IntelŪ ItaniumŪ 2 processors and processors using IA-64 architecture, although performance may be faster on processors using IA-64 architecture when compiled using G1.

Alternate Options

/G1 Linux: -mtune=itanium
Mac OS X: None
Windows: None
/G2 Linux: -mtune=itanium2
Mac OS X: None
Windows: None
/G2-p9000 Linux: -mtune=itanium2-p9000
Mac OS X: None

Windows: None

See Also

mtune compiler option

Example

In the following example, the compiled binary of the source program prog.f is optimized for the IntelŪ ItaniumŪ 2 processor by default. The same binary will also run on processors using IA-64 architecture. All lines in the code example are equivalent.

ifort prog.f
ifort /G2 prog.f

In the following example, the compiled binary is optimized for the processors using IA-64 architecture:

ifort /G1 prog.f