Interprocedural Analysis (IPA) Optimization Options
Interprocedural analysis includes a set of compiler techniques that examine an entire program, as opposed to a single function, to increase the opportunity for optimization, particularly when a program uses many, frequently called functions.
Interprocedural analysis includes a set of compiler techniques, inlining and cloning, that examine an entire program, as opposed to a single function, to increase the opportunity for optimization, particularly when a program uses many, frequently called functions.
Inlining/cloning transforms code in ways that increase the opportunity for optimization. The user controls inlining/cloning through the use of command line options. If the user desires more fine grained control, directives may be placed within the code. By default, the compiler will attempt inlining/cloning where it deems beneficial. Inlining/cloning may increase object code size.
-h ipalevel
Default: -h ipa4
| IPA level | Behavior |
|---|---|
| 0 | All inlining and cloning is disabled. All inlining and cloning compiler directives are ignored. |
| 1 | Directive IPA. Inlining/cloning is attempted for call sites and routines that are under the control of a compiler directive. See Inline and Clone Directives. |
| 2 | Inlining. Inline a call site to an arbitrary depth as long as the expansion does not exceed some compiler-determined threshold. The call site must flatten for any expansion to occur. The call site is said to "flatten" when there are no calls to external procedures in the expanded code. The call site must reside within the body of a loop and the entire loop body must flatten. A loop body is said to "flatten" when all call sites within the body of the loop are flattened. Includes level 1. |
| 3 | Inlining and cloning. Includes level 1 and 2. Plus, constant actual argument inlining and tiny routine. |
| 4 | Cloning and aggressive inlining. This includes levels 1, 2, and 3. Additionally, a call site does not have to reside in a loop body to inline; nor does the call site have to necessarily flatten to inline. |
| 5 | Aggressive inlining and aggressive cloning. Includes levels 1, 2, 3, and 4. |
The -h ipalevel option is identical to -O ipalevel
-h ipafrom=source[:source] ...
Explicitly indicate the functions to consider for inlining/cloning. The source arguments identify each file or directory that contains the functions to consider for inlining/cloning. Spaces are not allowed on either side of the equal sign.
- C or C++ sourcefiles with extension: .C, .c++, .C++, .cc, .cxx, .Cxx, . CXX, or .CC
- Directory containing filetypes mentioned above