IPO for Large Programs
In most cases, IPO generates a single true object file for the link-time compilation. This behavior is not optimal for very large programs, perhaps even making it impossible to use
[Q]ipocompiler option on the application.
The compiler provides two methods to avoid this problem. The first method is an automatic size-based heuristic, which causes the compiler to generate multiple true object files for large link-time compilations. The second method is to manually instruct the compiler to perform multi-object IPO.
- Use the[Q]ipoNcompiler option and pass an integer value in the place ofN.
- Use the[Q]ipo-separatecompiler option.The number of true object files generated by the link-time compilation is invisible to you unless the[Q]ipo-cor[Q]ipo-Scompiler option is used.
Regardless of the method used, it is best to use the compiler defaults first and examine the results. If the defaults do not provide the desired results then experiment with generating a different number of object files.
You can use the
[Q]ipo-jobscompiler option to control the number of processes, or jobs, executed during parallel IPO builds.
to Create Multiple Object Files
Nto Create Multiple Object Files
If you specify
[Q]ipo0, which is the same as not specifying a value, the compiler uses heuristics to determine whether to create one or more object files based on the expected size of the application. The compiler generates one object file for small applications, and two or more object files for large applications. If you specify any value greater than 0, the compiler generates that number of object files, unless the value you pass a value that exceeds the number of source files. In that case, the compiler creates one object file for each source file then stops generating object files.
The following example commands demonstrate how to use
[Q]ipo2option to compile large programs.
icl /Qipo2 /c a.cpp b.cpp