There are some general optimization guidelines for IPO that you should keep in mind:
Large IPO compilations might trigger internal limits of other compiler optimization phases.
Combining IPO and PGO can be a key technique for C++ applications. The -O2, -ipo, and -prof-use (Linux*) or /O2, /Qipo, /Qprof-use (Windows*) options can result in significant performance gains.
IPO benefits C more than C++, since C++ compilations include intra-file inlining by default.
Applications where the compiler does not have sufficient intermediate representation (IR) coverage to do whole program analysis might not perform as well as those where IR information is complete.
In addition to the general guidelines, there are some practices to avoid while using IPO. The following list summarizes the activities to avoid:
Do not use the link phase of an IPO compilation using mock object files produced for your application by a different compiler. The Intel® compiler cannot inspect mock object files generated by other compilers for optimization opportunities.
Do not link mock files with the -prof-use (Linux* and Mac OS*) or /Qprof-use (Windows*) option unless the mock files were also compiled with the -prof-use (Linux and Mac OS) or /Qprof-use (Windows) option.
Update make files to call the appropriate Intel linkers when using IPO from scripts. For Linux and Mac OS, replaces all instances of ld with xilid; for Windows, replace all instances of link.exe with xilink.
Update make file to call the appropriate Intel archivere. Replace all instances of ar with xiar.