Creating a Multifile IPO Executable

This topic describes how to enable multifile IPO for compilations targeted for IA-32 and Itanium(TM)-based systems.

Procedure for IA-32 Systems

Compile your modules with -ipo as follows:

prompt>icc -ipo -c a.cpp b.cpp c.cpp

Use -c to stop compilation after generating .o files. Each object file has the IR for the corresponding source file. With preceding results, you can now optimize interprocedurally:

prompt>icc -ipo a.o b.o c.o

Multifile IPO is applied only to modules that have an IR, otherwise the object file passes to the link stage. For efficiency, combine steps 1 and 2:

prompt>icc -ipo a.cpp b.cpp c.cpp

Procedure for Itanium(TM)-based Systems

Compile your modules with -ipo as follows:

prompt>ecc -ipo -c a.cpp b.cpp c.cpp

Use -c to stop compilation after generating .o files. Each object file has the IR for the corresponding source file. With preceding results, you can now optimize interprocedurally:

prompt>ecc -ipo a.o b.o c.o

Multifile IPO is applied only to modules that have an IR, otherwise the object file passes to link stage. For efficiency, combine steps 1 and 2:

prompt>ecc -ipo a.cpp b.cpp c.cpp

See Using Profile-Guided Optimization: An Example for a description of how to use multifile IPO with profile information for further optimization.