Intel® Fortran Compiler 16.0 User and Reference Guide

ATTRIBUTES OPTIMIZATION_PARAMETER

The ATTRIBUTES directive option OPTIMIZATION_PARAMETER passes certain information about a procedure or main program to the optimizer.

Syntax

!DIR$ ATTRIBUTES OPTIMIZATION_PARAMETER: string::{ procedure-name | named-main-program}

string

Is a character constant that is passed to the optimizer. The constant must be delimited by apostrophes or quotation marks, and it may have one of the following values:

  • TARGET_ARCH= cpu

    Tells the compiler to generate code specialized for a particular processor. For the list of cpus you can specify, see option [Q]x.

  • INLINE_MAX_PER_ROUTINE= n

    Specifies the maximum number of times the inliner may inline into the procedure. The n is one of the following:

    • A non-negative scalar integer constant (>=0) that specifies the maximum number of times the the inliner may inline into the procedure. If you specify zero, no inlining is done into the routine.

    • The keyword UNLIMITED, which means that there is no limit to the number of times the inliner may inline into the procedure.

    For more information, see option [Q]inline-max-per-routine.

  • INLINE_MAX_TOTAL_SIZE= n

    Specifies how much larger a routine can normally grow when inline expansion is performed. The n is one of the following:

    • A non-negative scalar integer constant (>=0) that specifies the permitted increase in the routine's size when inline expansion is performed. If you specify zero, no inlining is done into the routine.

    • The keyword UNLIMITED, which means that there is no limit to the size a routine may grow when inline expansion is performed.

    For more information, see option [Q]inline-max-total-size.

procedure-name

Is the name of a procedure.

named-main-program

Is the name of a main program

Description

The characters in string can appear in any combination of uppercase and lowercase. The following rules also apply to string:

You can specify multiple ATTRIBUTES OPTIMIZATION_PARAMETER directives for one procedure or one main program.

For the named procedure or main program, the values specified for ATTRIBUTES OPTIMIZATION_PARAMETER override any settings specified for the following compiler options:

Example

Consider the two attributes optimization_parameter directives in the following code:

function f (x)
!dir$ attributes optimization_parameter: “inline_max_per_routine=10” :: f
!dir$ attributes optimization_parameter: “inline_max_total_size=2000” :: f
real :: f, x
…

The two directives have the same effect as if the function F had been complied with "/Qinline-max-per-routine:10 /Qinline-max-total-size:2000" on Windows* or with "-inline-max-per-routine=10 -inline-max-total-size=2000" on Linux* or OS X*, that is, inlining will not increase the size of F by more than 2000 and the inliner will not inline routines into F more than 10 times.

See Also