apogee-software apogee compilers c & c++ & fortran 77 & fortran 90 User Manual

Page of 223
Chapter 4: Control-Variable Definitions
General Code Control
Apogee User’s Manual  Page 93
Some programs do not experience this disadvantage.  If the program never calls subroutines to
a nesting level equal to or greater than the number of available windows, there is no need to
"spill" the windows in this fashion.  Similarly, if the program does call subroutines to a deep
nesting level, but does so only relatively infrequently, there will only be a small performance
impact.
Programs that do experience this disadvantage are programs that call subroutines to a deep
nesting level and do the subroutine calling and returning quite frequently compared to the
other computation in the program.  Such programs can experience a significant or even severe
slowdown on SPARC processors due to the need to spill the register windows.
The
flat
 control-variable is available to specify that the register window property is not to be
used when compiling a particular routine.  The
flat
 control-variable accepts a list of names.
If a routine's name is a member of this list at the start of the routine, then that routine will be
compiled in such a fashion that it does not request a new window when it is entered (and does
not return a window when it exits).  This has the effect of removing any possibility that calling
the routine will trigger a register window spill.  However, it also has the effect of slowing
down the compiled code of the routine because return address manipulation must now be
done explicitly, and because the number of free scratch registers that the routine has available
for performing computations without having to save or restore registers drops from 25 to 10.
The net effect of these various considerations is that the effect of the use of
flat
 mode is very
dependent on the particular circumstances.  For most programs and for most routines,
flat
mode will cause a net slow down.  However, if a routine is used in a fashion that frequently
triggers register window spill, and if the routine is not complicated enough so that the
reduction of available scratch registers causes a significant slow down in the compiled code for
the routine, then the use of
flat
 mode may cause a significant speed up.  For example, a short
C routine that implemented a highly recursive algorithm would be a good candidate for trying
flat
 mode.
An important restriction applies to the use of
flat
 mode.  C programs that use
setjmp
 or
longjmp
 will not work if any routines are compiled in
flat
 mode.
Independent of
flat
 mode, some leaf routines are optimized so that they do not use a register
window.
The
flat
 control-variable has routine scope and accepts as values a list of names.  The first-
default-value and the second-default-value are both the null list.
Control-Variable fltconst — Single Precision Floating Point
Constants
According to ANSI FORTRAN 77:
a floating point constant written either without an exponent, or with an "
E
" exponent,
is of type
REAL
 (i.e.
REAL*4
), and
a floating point constant written with a "
D
" exponent is of type
DOUBLE PRECISION
(i.e.
REAL*8
).