The switches, -inline_looplevel=<n> [-inll]
and
-ipa_looplevel=<n>
[-ipall], set a minimum DO
loop nest level for CALL/function reference expansion. The
-inline_looplevel
and -ipa_looplevel
switches enable you to limit inlining and IPA to just routines that
are referenced in nested loops, where the reduced call overhead or
enhanced optimization will be multiplied.
The argument is defined from the most deeply nested leaf of the call tree. The default, 10, allows inlining (IPA) for the 10 deepest nest levels, for example:
PROGRAM MAIN .. CALL A ---> SUBROUTINE A .. DO DO CALL B --> SUBROUTINE B ENDDO DO ENDDO DO CALL C ---> SUBROUTINE C ENDDO ENDDO
The CALL B
is inside a doubly nested loop, and would
be more profitable to expand than the CALL A
. The
CALL C
is quadruply nested, so inlining C
would yield the biggest gain of the three.
The argument is defined from the most deeply nested
CALL
or function reference:
-inline_looplevel=1
says only the routines
referenced in the most deeply nested call site(s) can be inlined,
for example, SUBROUTINE C
. If more than one routine
is called at the same loop nest level, all of them are selected
when that level is included.
-inline_looplevel=2
says only routines
CALLED
at the most deeply nested level
and one loop less deeply nested can be inlined. The
-inline_looplevel=3
setting would be required to
inline SUBROUTINE B
, since its call is two loops
less nested than the call to SUBROUTINE C
. A value
of 3 or greater will cause C
to be inlined into
B
, then the new B
to be inlined into
the main program.
-inline_looplevel
(or -ipa_
looplevel
) to a large value will permit inlining at any
nesting level.
-listoptions=c
includes the nesting depth level
of each call in each program unit and the aggregate nesting
depth which is the sum of the nesting depths for each call site,
starting from the main program. This information can be used to
identify the best routines for inlining.
-inline_looplevel
test will be inlined everywhere it is used, even in places
that are not in deeply nested loops. If some, but not all,
invocations of a routine are to be expanded, use the inline and
IPA directives just before each CALL/reference that is to be
expanded. (See Section 7.1.5.)
Copyright © Digital Equipment Corporation. 1997.
All Rights Reserved.