Developer Guide and Reference

Contents

optimization_parameter

Passes certain information about a function to the optimizer.

Syntax

Linux*
and
macOS*
:
#pragma intel optimization_parameter target_arch
=<
CPU
>
#pragma intel optimization_parameter inline-max-total-size
=
n
#pragma intel optimization_parameter inline-max-per-routine
=
n
Windows*:
#pragma [intel] optimization_parameter target_arch
=<
CPU
>
#pragma [intel] optimization_parameter inline-max-total-size
=
n
#pragma [intel] optimization_parameter inline-max-per-routine
=
n
Arguments
target_arch
=<
CPU
>
For the list of CPUs, see compiler options
-m
(or
/arch
) and
[Q]x
.
inline-max-per-routine
=
n
Specifies the maximum number of times the inliner may inline into the routine.
n
is one of the following:
  • A non-negative integer constant that specifies the maximum number of times the inliner may inline into the function. If you specify zero, no inlining is done into the function.
  • The keyword unlimited, which means that there is no limit to the number of times the inliner may inline into the function.
For more information, see option
[Q]inline-max-per-routine
.
inline-max-total-size
=
n
Specifies how much larger a function can normally grow when inline expansion is performed.
n
is one of the following:
  • A non-negative integer constant that specifies the permitted increase in the function's size when inline expansion is performed. If you specify zero, no inlining is done into the function.
  • The keyword unlimited, which means that there is no limit to the size a function may grow when inline expansion is performed.
For more information, see option
[Q]inline-max-total-size
.
Description
The
intel optimization_parameter target_arch
pragma controls the
-m
(or
/arch
) option settings at the function level, overriding the option values specified at the command-line.
Place
#pragma intel optimization_parameter target_arch=
<CPU>
at the head of a function to get the compiler to target that function for a specified instruction set. The pragma
works like the
-m
(or
/arch
) and
[Q]x
options, but
applies only to the function before which it is placed.
The pragmas
intel optimization_parameter inline-max-total-size=n
and
intel optimization_parameter inline-max-per-routine=n
specify information used during inlining into a function.

Examples

Example: Targeting code for Intel® Advanced Vector Extensions (Intel® AVX) processors
icc -mAVX foo.c // on Linux*
and
macOS*
The following code targets just the function
bar
for Intel® AVX processors, regardless of the command line options used.
Example: Targeting a function for Intel® Advanced Vector Extensions (Intel® AVX) processors
#pragma intel optimization_parameter target_arch=AVX void bar() { ... }

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certai