This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Spill frequency and alignment



I ran a comparison test on the classic Dawes/Whittle Laboratory
implicit time-marching turbomachinery CFD code.  The code is
written entirely in single precision.  As I related yesterday, there
are significant spills, and g77 runs faster on Intel with -Os than
with -O2.  In certain important sections of the code, the number
of memory references associated with spills and restores
approaches the number of declared memory references.

lf95, which employs mis-aligned 80-bit spills, takes 25% longer
to run than g77 or lf90.  I would tend to ascribe this to the spill
problem, having examined important sections of the generated
code and seeing this as the primary target for criticism.  For a
double precision code, the failure to align declared arrays would
be a more serious factor.

The differences in results were consistent with my expectation;
the widened spills changed results to a degree similar to what is
expected from the usual re-associations performed by various
compilers.  The code runs reliably in plain single precision, but I
consider the advantage of widened register calculation to be
worth the slight time penalty of less than 5%.  Some of this may
often be regained by more rapid and reliable iterative
convergence.  However, the widened spills don't demonstrate
any advantage worth paying in execution time.

I believe this confirms Toon's suspicion that widened spills will
be unsatisfactory without guaranteed alignment.

Going way out on a limb, I would guess that the penalty for 80-bit
spills rather than 32-bit ones could be reduced from 25% to 10%
by proper alignment, and possibly to 5% by widening only by one
step (64-bit spills for single precision, 80-bit spills for double).

 I don't have a strong feeling about 64-bit vs 80-bit spills for
single precision, but I do believe we will be unhappy with
mis-aligned widened spills.

Dr. Timothy C. Prince
Consulting Engineer
Solar Turbines, a Caterpillar Company
alternate e-mail: tprince@computer.org

           To:                                              INTERNET - IBMMAIL


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]