Creating a Multifile IPO Executable

This topic describes how to create a multifile IPO executable for compilations targeted for IA-32 and Itanium®-based systems.

Procedure for IA-32 Systems

If you separately compile and link your source modules with -ipo:

  1. Compile your modules with -ipo as follows:
    prompt>
    icc -ipo -c a.c b.c c.c
  2. Use the -c option 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.c b.c c.c

Procedure for Itanium®-based Systems

If you separately compile and link your source modules with -ipo:

  1. Compile your modules with -ipo as follows:
    prompt>
    ecc -ipo -c a.c b.c c.c
  2. 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.c b.c c.c

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