More than you ever wanted to know about Fortran array indexing ;-)
Jeffrey A Law
law@cygnus.com
Wed Oct 8 21:19:00 GMT 1997
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
More information about the Gcc
mailing list