Procedure Inlining
Inlining: replace a function call by that function source code
Advantages:
- increase opportunities for processor optimizations
- more opportunities for Loop Nest optimizations
Candidates for inlining are modules that:
- “small” i.e. not much source code
- are called very often (typically in a loop)
- do not take much time per call
-
Inhibition to inlining:
- mismatched in the subroutine arguments (type or shape)
- no inlining across languages (e.g. Fortran calls C subroutine)
- no static (SAVE) local variables
- not varargs routines, no recursive routines
- no functions with alternate entry points
- no nested subroutines (like in F90)
-INLINE:list=[on|off] (default off)
-INLINE:must=sub1:never=sub2
-IPA:inline=[on|off] (default on)