Developer Guide and Reference

Contents

Using IPO

This topic discusses how to use IPO from the command line.

Compiling and Linking Using IPO

To enable IPO, you first compile each source file, then link the resulting source files.
First, compile your source files with
[Q]ipo
compiler as shown below:
Operating System
Example Command
Linux*
and
macOS*
icpc -ipo -c a.cpp b.cpp c.cpp
Windows*
icl /Qipo /c a.cpp b.cpp c.cpp
The output of the above example command differs according to operating system:
  • Linux
    and
    macOS*
    : The commands produce
    a.o
    ,
    b.o
    , and
    c.o
    object files.
  • Windows: The commands produce
    a.obj
    ,
    b.obj
    , and
    c.obj
    object files.
Use the
c
compiler option to stop compilation after generating
.o
or
.obj
files. The output files contain compiler intermediate representation (IR) corresponding to the compiled source files.
Second, link the resulting files. The following example command will produce an executable named
app
:
Operating System