The -save
switch tells KAP whether to perform live
variable analysis to determine if the value of a local scalar
variable in a subroutine or function needs to be saved between
invocations of the routine being processed. SAVE statements will
be generated for any variables requiring them. KAP will not delete
or ignore a SAVE statement coded by the user.
Saving local variables may be required for correct execution of the program, but can restrict KAP optimizations.
With -save=manual_adjust
, KAP assumes you have
inserted the necessary SAVE statements into the code and performs no
corresponding analysis of its own. The user-written SAVE statements
are assumed to be correct and sufficient. This is not affected by
the -[no]recursion
switch.
The effect of -save=manual_adjust
depends on the
[no]recursion
setting:
-norecursion
, SAVE statements will
be added for variables that are used before being defined on at
least one path from one entry point to the routine.
-recursion
, SAVE statements will be
added for variables that are used before being defined on all
paths from all entry points to the routine.
The effect of -save=all_adjust
depends on the
[no]recursion
setting:
-norecursion
, treat all local variables
as SAVEd, except those that are defined before use in all paths
from all entry points and which are not in user-written SAVE
statements.
With -recursion
, this is the same as
-save=all
:
-save=all
tells KAP that
all routine-local variables and COMMON blocks are retained
between invocations. This is as if all variables and COMMON
blocks were in SAVE statements. This is not affected by the
-[no]recursion
switch.