public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* more on fortran array indexing
@ 1997-10-02 13:04 Richard Henderson
  1997-10-03  1:33 ` Toon Moene
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 1997-10-02 13:04 UTC (permalink / raw)
  To: egcs

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~

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-10-26  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-02 13:04 more on fortran array indexing Richard Henderson
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

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).