Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

ipo, Qipo

Enables interprocedural optimization between files.

Syntax

Linux:

-ipo

-ipo[n] (ifort only)

-no-ipo

Windows:

/Qipo

/Qipo[n] (ifort only)

/Qipo-

Arguments

ifx:

None

ifort: n

Is an optional integer that specifies the number of object files the compiler should create. The integer must be greater than or equal to 0.

Default

-no-ipo or /Qipo-

Multifile interprocedural optimization is not enabled.

Description

This option enables interprocedural optimization between files. This is also called multifile interprocedural optimization (multifile IPO) or Whole Program Optimization (WPO).

ifx:

When you specify this option, the compiler performs inline function expansion and other interprocedural optimizations for calls to functions defined in separate files.

ifort:

If you do not specify n, the default is 0. Otherwise:

  • If n is 0, the compiler decides whether to create one or more object files based on an estimate of the size of the application. It generates one object file for small applications, and two or more object files for large applications.

  • If n is greater than 0, the compiler generates n object files, unless n exceeds the number of source files (m), in which case the compiler generates only m object files.

Linux

On ifx, option -ipo automatically sets option -flto.

Windows

On ifx, option/Qipo automatically sets option -fuse-ld=lld.

NOTE:

On ifx, when you specify option [Q]ipo with option [q or Q]opt-report, an optimization report will be generated during the compilation step for each of the files that are compiled, and for the link time compilation. Files generated during the compilation step are named <file-name>.optrpt. The file generated during the link step is called ipo_out.optprt.

On ifort, when you specify option [Q]ipo with option [q or Q]opt-report, an optimization report will be generated at link time. After linking, you will see a report named ipo_out.optrpt in the folder where you linked all of the object files.

CAUTION:

Files compiled with option -ipo or /Qipo should also be linked with the same option, or the link step may fail.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation. Offloading can only be enabled when using ifx.

IDE Equivalent

Visual Studio: Optimization > Interprocedural Optimization

General > Whole Program Optimization

Alternate Options

None

See Also