-qtune

Category

Optimization and tuning

Pragma equivalent

None.

Purpose

Tunes instruction selection, scheduling, and other architecture-dependent performance enhancements to run best on a specific hardware architecture.

Syntax

Read syntax diagramSkip visual syntax diagram
                 .-balanced-.   
>>- -q--tune--=--+-auto-----+----------------------------------><
                 +-604------+   
                 +-ppc970---+   
                 +-pwr3-----+   
                 +-pwr4-----+   
                 +-403------+   
                 +-pwr5-----+   
                 +-pwr6-----+   
                 +-pwr7-----+   
                 +-rs64a----+   
                 +-rs64b----+   
                 '-rs64c----'   

Defaults

-qtune=balanced when the default -qarch setting is in effect. Otherwise, the default depends on the effective -qarch setting. See Table 1 for details.

Parameters

403
Optimizations are tuned for the PowerPC 403 processor.
604
Optimizations are tuned for the PowerPC® 604 processor.
auto
Optimizations are tuned for the platform on which the application is compiled.
balanced
Optimizations are tuned across a selected range of recent hardware.
ppc970
Optimizations are tuned for the PowerPC 970 processor.
pwr3
Optimizations are tuned for the POWER3 hardware platforms.
pwr4
Optimizations are tuned for the POWER4 hardware platforms.
pwr5
Optimizations are tuned for the POWER5 hardware platforms.
pwr6
Optimizations are tuned for the POWER6® hardware platforms.
pwr7
Optimizations are tuned for the POWER7® hardware platforms.
rs64a
Optimizations are tuned for the RS64I processor.
rs64b
Optimizations are tuned for the RS64II processor.
rs64c
Optimizations are tuned for the RS64III processor.
Note: As of the V9.0 release of the compiler, suboptions representing 601, 602, 603, POWER® and POWER2 architectures are deprecated.

Usage

If you want your program to run on more than one architecture, but to be tuned to a particular architecture, you can use a combination of the -qarch and -qtune options. These options are primarily of benefit for floating-point intensive programs.

By arranging (scheduling) the generated machine instructions to take maximum advantage of hardware features such as cache size and pipelining, -qtune can improve performance. It only has an effect when used in combination with options that enable optimization.

Although changing the -qtune setting may affect the performance of the resulting executable, it has no effect on whether the executable can be executed correctly on a particular hardware platform.

Acceptable combinations of -qarch and -qtune are shown in the following table.

Table 1. Acceptable -qarch/-qtune combinations
-qarch option Default -qtune setting Available -qtune settings
403 403 auto | 403
604 604 auto | 604
ppc balanced auto | 604 | rs64a | rs64b | rs64c | pwr3 | pwr4 | pwr5 | pwr6 | pwr7 | ppc970 | balanced
ppcgr balanced auto | 604 | rs64b | rs64c | pwr3 | pwr4 | pwr5 | pwr6 | pwr7 | ppc970 | balanced
ppc64 balanced auto | rs64a | rs64b | rs64c | pwr3 | pwr4 | pwr5 | pwr6 | pwr7 | ppc970 | balanced
ppc64gr balanced auto | rs64b | rs64c | pwr3 | pwr4 | pwr5 | pwr6 | pwr7 | ppc970 | balanced
ppc64grsq balanced auto | rs64b | rs64c | pwr3 | pwr4 | pwr5 | pwr6 | pwr7 | ppc970 | balanced
ppc64v ppc970 auto | ppc970 | pwr6 | balanced
ppc970 ppc970 auto | ppc970 | balanced
pwr3 pwr3 auto | pwr3 | pwr4 | pwr5 | pwr7 | ppc970 | balanced
pwr4 pwr4 auto | pwr4 | pwr5 | pwr7 | ppc970 | balanced
pwr5 pwr5 auto | pwr5 | pwr7 | balanced
pwr5x pwr5 auto | pwr5 | pwr7 | balanced
pwr6 pwr6 auto | pwr6 | pwr7 | balanced
pwr6e pwr6 auto | pwr6 | balanced
pwr7 pwr7 auto | pwr7 | balanced
rs64a rs64a auto | rs64a
rs64b rs64b auto | rs64b
rs64c rs64c auto | rs64c

Predefined macros

None.

Examples

To specify that the executable program testing compiled from myprogram.c is to be optimized for a POWER7 hardware platform, enter:
xlc -o testing myprogram.c -qtune=pwr7

Related information