The following table explains how to enable multifile IPO for compilations targeted for IA-32 hosts and for compilations targeted for Itanium(TM)-based systems.
IA-32 systems |
Itanium(TM)-based systems |
Compile your modules with -ipo as follows: 1. prompt>ifc -ipo -c a.f b.f c.f 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: 2. prompt>ifc -onu_ipo_file -ipo a.o b.o c.o The -oname option stores the executable in nu_ipo_file. 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>ifc -ipo -onu_ipo_file a.f b.f c.f |
Compile your modules with -ipo as follows: 1. prompt>efc -ipo -c a.f b.f c.f 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: 2. prompt>efc -onu_ipo_file -ipo a.o b.o c.o The -oname option stores the executable in nu_ipo_file. 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>efc -ipo -onu_ipo_file a.f b.f c.f |
See Using Profile-Guided Optimization: An Example for a description of how to use multifile IPO with profile information for further optimization.