Using interprocedural analysis
Interprocedural analysis (IPA) enables the compiler to optimize across different files (whole-program analysis), and it can result in significant performance improvements.
You can specify interprocedural analysis on the compilation step only or on both compilation and link steps in whole program mode. Whole program mode expands the scope of optimization to an entire program unit, which can be an executable or a shared object. As IPA can significantly increase compilation time, you should limit using IPA to the final performance tuning stage of development.
You can enable IPA by specifying the -qipa option. The most commonly used suboptions and their effects are described in the following table. The full set of suboptions and syntax is described in -qipa .
- Do preliminary performance analysis and tuning before compiling with the -qipa option, because the IPA analysis uses a two-pass mechanism that increases compilation time and link time. You can reduce some compilation and link overhead by using the -qipa=noobject option.
- Specify the -qipa option on both the compilation and the link steps of the entire application, or as much of it as possible. Use suboptions to indicate assumptions to be made about parts of the program not compiled with -qipa.
| Suboption | Behavior |
|---|---|
| level=0 | Program partitioning and simple interprocedural optimization, which consists
of:
|
| level=1 | Inlining and global data mapping. Specifically:
|
| level=2 | Global alias analysis, specialization, interprocedural data flow:
|
| inline=suboptions | Provides precise control over function inlining. |
| fine_tuning | Other values for -qipa provide the ability to specify the behavior of library code, tune program partitioning, read commands from a file, and so on. |
- XL C/C++ and XL Fortran provide backwards compatibility with IPA objects that are created by
earlier compiler versions. If IPA object files that are compiled with newer versions of compilers
are linked by an earlier version, errors occur during the link step. For example, if IPA object file
a.ois compiled by XL C/C++ 13.1.3 and is to be linked with IPA object fileb.othat is compiled by XL Fortran, V15.1.0, then you must use a compiler whose version is XL C/C++ 13.1.3 or later. - XL C/C++ for AIX 16.1 and XL Fortran for AIX, V16.1 produce matching IPA level
information. IPA object files with matching IPA level information can be linked together.
XL C/C++ and XL Fortran versions released at the same time produce matching IPA
level information. IPA object files with matching IPA level information can be linked together. For
example, the IPA level for XL C/C++ 13.1.3 matches with the IPA for XL Fortran 15.1.3. The following
table lists some matching XL C/C++ and XL Fortran releases:
Table 2. Compiler versions and release dates Compiler version General availability (Release date) XL C/C++ for Linux® 16.1.1
XL Fortran for Linux 16.1.1
30-November-2018 XL C/C++ for Linux 16.1
XL Fortran for Linux 16.1
27-April-2018 XL C/C++ for Linux 13.1.6
XL Fortran for Linux 15.1.6
15-December-2017 XL C/C++ for Linux 13.1.5
XL Fortran for Linux 15.1.5
15-December-2016 XL C/C++ for Linux 13.1.4
XL Fortran for Linux 15.1.4
17-June-2016 XL C/C++ for Linux 13.1.3
XL Fortran for Linux 15.1.3
11-Dec-2015 XL C/C++ for Linux 13.1.0
XL Fortran for Linux 15.1.0
06-Jun-2014 XL C/C++ for Linux 12.1.0
XL Fortran for Linux 14.1.0
18-May-2012 For more information about the release dates of compiler products, see the Support Lifecycle website at https://www.ibm.com/support/lifecycle/.
If your compiler version has two release dates on the Support Lifecycle web site, determine the date based on your product ID.