Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

ipo, Qipo

Enables interprocedural optimization between files.

Syntax

Linux:

-ipo

-no-ipo

Windows:

/Qipo

/Qipo-

Arguments

None

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).

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

Linux

Option -ipo automatically sets option -flto.

Windows

Option /Qipo automatically sets option -fuse-ld=lld.

NOTE:

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.

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.

IDE Equivalent

Visual Studio: Optimization > Interprocedural Optimization

General > Whole Program Optimization

Alternate Options

None

See Also