Fortran User's Guide

-inline=f1[,...fn]

Inline specified routines.

    SPARC: 77/90 x86:77

Request that the optimizer inline the user-written routines named in the f1,...,fn list. Inlining is an optimization technique whereby the compiler effectively replaces a subprogram reference such as a CALL or function call with the actual subprogram code itself. Inlining often provides the optimizer more opportunities to produce efficient code.

The list is a comma-separated list of functions and subroutines.

Example: Inline the routines xbar, zbar, vpoint:


demo% f77 -O3 -inline=xbar,zbar,vpoint *.f

Following are the restrictions; no warnings are issued:

With -O4, the compilers normally try to inline all appropriate user-written subroutines and functions. Adding -inline with -O4 actually degrades performance by restricting the optimizer's inlining to only those routines in the list.