This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More than you ever wanted to know about Fortran array indexing ;-)
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: More than you ever wanted to know about Fortran array indexing ;-)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 08 Oct 1997 20:28:08 -0600
- cc: Richard Henderson <rth at cygnus dot com>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <9710080552.AA13313@moene.indiv.nluug.nl>you write:
> I wrote that that would be a nice follow on project, but it turns
> out that gcc already knows how to do that; unfortunately, the
> function that decides about this optimisation almost never applies it.
>
> I am talking about `combine_givs_p' in loop.c. Basically it says:
> If a giv G2 can be expressed as a function of giv G1 and that
> function is a valid address expression, and the resulting addressing
> mode is cheaper than the original, then do not reduce G2.
Yes. On a somewhat related note, as I've mentioned, with my patch to
handle more complex givs (aka the USE patch) I generally get worse code
on my PA. I _believe_ this is due to loop not realizing that many givs
are related and due to the giv cost/benefit analysis not handling more
complicated givs.
jeff