-mtune (-qtune)
Category
Pragma equivalent
None.
Purpose
Tunes instruction selection, scheduling, and other architecture-dependent performance enhancements to run best on a specific hardware architecture. Allows specification of a target SMT mode to direct optimizations for best performance in that mode.
Defaults
-mtune=pwr8, -mtune=power8, or -qtune=pwr8:st
Parameters for CPU suboptions
The following CPU suboptions allow you to specify a particular architecture for the compiler to target for best performance:
- auto
- Optimizations are tuned for the platform on which the application is compiled. You can specify the auto suboption with -qtune only.
- balanced
- Optimizations are tuned across a selected range of recent hardware. You can specify the balanced suboption with -qtune only.
- pwr8
- Optimizations are tuned for the POWER8® hardware platforms.
- power8
- Optimizations are tuned for the POWER8 hardware platforms. You can specify this suboption with -mtune only.
Parameters for SMT suboptions
The following simultaneous multithreading (SMT) suboptions allow you to optionally specify an execution mode for the compiler to target for best performance. You can specify these SMT suboptions with -qtune only.
- balanced
- Optimizations are tuned for performance across various SMT modes for a selected range of recent hardware.
- st
- Optimizations are tuned for single-threaded execution.
- smt2
- Optimizations are tuned for SMT2 execution mode (two threads).
- smt4
- Optimizations are tuned for SMT4 execution mode (four threads).
- smt8
- Optimizations are tuned for SMT8 execution mode (eight threads).
Usage
By arranging (scheduling) the generated machine instructions to take maximum advantage of hardware features such as cache size and pipelining, -mtune or -qtune can improve performance. It only has an effect when used in combination with options that enable optimization.
Although changing the -mtune or -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.
Predefined macros
None.
Examples
xlc -o testing myprogram.c -mtune=pwr8
xlc -o testing myprogram.c -qtune=pwr8:smt4