public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: egcs@cygnus.com
Subject: more on fortran array indexing
Date: Thu, 02 Oct 1997 13:04:00 -0000	[thread overview]
Message-ID: <19971002130319.01737@dot.cygnus.com> (raw)

Last night I examined the differences in the output of the 
friendlier FASTER_ARRAY_REFS, and the patched expr.c ARRAY_REF.

They output, respectively,

   addr = ((n*64)/8 * (j-1)) + (i*8) + base - 8

and

   addr = (i-1)*8 + ((j-1) * (n*64)) / 8 + base

IMO, it is obviously the FLOOR_DIV 8 that is causing the problem.

Question: Why in the world are arrays indexed as bits?  There
seems to me to be very little use for such a thing, and a front
end that would need it could build it out of simpler constructs, no?

Or perhaps add a flag to TYPE to indicate whether the array is
indexed via bytes or bits to get rid of this lossage where it isn't
needed.  Note that even in the FASTER_ARRAY_REFS case, there is 
still the divide in the asm output -- we were able to reduce it
out of the loop, but not eliminate it.

Comments?


r~

             reply	other threads:[~1997-10-02 13:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-02 13:04 Richard Henderson [this message]
1997-10-03  1:33 ` Toon Moene
1997-10-03 11:05   ` Richard Henderson
1997-10-04  8:12     ` Toon Moene
1997-10-05  3:12       ` Toon Moene
1997-10-26  9:05   ` Jeffrey A Law

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=19971002130319.01737@dot.cygnus.com \
    --to=rth@cygnus.com \
    --cc=egcs@cygnus.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).