public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stephen L Moshier <moshier@mediaone.net>
To: tprince@cat.e-mail.com, egcs@cygnus.com
Subject: Spill frequency and alignment
Date: Sun, 20 Dec 1998 05:57:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.05.9812200808590.31836-100000@moshier.ne.mediaone.net> (raw)

  In certain important sections of the code, the number
  of memory references associated with spills and restores
  approaches the number of declared memory references.

In the terminology of reload, spilling merely reassigns a variable
from a register to a home on the stack.  I suspect that the force-mem
switch tends to create gratuitous copying, from the declared memory
variable to a register which then suffers reloading to the stack.  It
would be interesting if you were to find that -fno-force-mem had an
effect on either the overall execution speed or the amount of spilling
in your particular benchmark.

The fact that something was spilled does not imply that it was also
necessarily truncated.  Spilling and truncating are two different
effects to be evaluated.  If a `double' variable is merely copied into
a register and then recopied out to a `double' stack location, then it
was not actually truncated.  I thought we already had some test cases
that showed truncation, but in an hour or so of searching, I could not
find it either in the torture tests nor in any of the random C
programs that happened to be handy.  Thus I do not have a test case
for the bug, and the experience of searching for one has made me think
that the truncation effect may be rare compared to the overall
incidence of spilling.  That ratio affects the statistical estimation
of the speed penalty, because there would be no reason to widen the
spills that did not also truncate.

Permit me to reiterate that I consider extra-precise register problems
to be a hardware bug, not a compiler bug.  The Intel 8087 fraud is no
substitute for a real XFmode data type in the compiler nor for ways
to get IEEE behavior out of the hardware.

             reply	other threads:[~1998-12-20  5:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-20  5:57 Stephen L Moshier [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-12-18  9:16 tprince

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.05.9812200808590.31836-100000@moshier.ne.mediaone.net \
    --to=moshier@mediaone.net \
    --cc=egcs@cygnus.com \
    --cc=tprince@cat.e-mail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).