Start of change

TUNE

The TUNE option specifies the architecture for which the executable program will be optimized.

TUNE option syntax

Read syntax diagramSkip visual syntax diagramTUNE(1011121314)

Default is: The default TUNE level matches the ARCH level if ARCH is specified. If ARCH is not specified, both ARCH and TUNE default to 10.

Abbreviations are: None

Current supported architecture levels and groups of models are as follows:
10
Generates code that is optimized for the 2827-xxx (IBM® zEnterprise® EC12) and 2828-xxx (IBM zEnterprise BC12) models in IBM z/Architecture® mode.
11
Generates code that is optimized for the 2964-xxx (IBM z13®) and 2965-xxx (IBM z13s®) models in IBM z/Architecture mode.
12
Generates code that is optimized for the 3906-xxx (IBM z14) and 3907-xxx (IBM z14 ZR1) models in IBM z/Architecture mode.
13
Generates code that is optimized for the 8561-xxx (IBM z15) and 8562-xxx (IBM z15 T02) models in IBM z/Architecture mode.
14
Generates code that is optimized for the 3931-xxx (IBM z16) model in IBM z/Architecture mode.
The TUNE option specifies the architecture for which the executable program will be optimized. The TUNE level controls how the compiler selects the available machine instructions, while staying within the restrictions of the ARCH level in effect. Start of changeThe TUNE option does so to provide the highest performance possible on the given TUNE architecture, choosing from the instructions allowed by the given ARCH level.End of change
Note: TUNE impacts performance only; it does not impact the processor model on which you will be able to run your application.

Select TUNE to match the architecture of the machine where your application will run most often. The TUNE level must always be greater or equal to the ARCH level because you will want to tune an application for a machine on which it can run. The compiler enforces this by adjusting TUNE up rather than ARCH down. Start of changeTUNE does not specify where an application can run and it affects optimization only. End of change

Start of changeFor example, if you have production machines that are z15® and disaster recovery (DR) machines that are z14, you should compile with ARCH(12) and TUNE(13). In this way, your programs will run well on the DR machines and run as fast as possible in production.End of change

Note: If the specified TUNE level is lower than the specified ARCH level, the compiler adjusts the TUNE level to match the ARCH level.

Related references  
ARCH  

End of change