Memory partitioning considered harmful (!?)
Richard Guenther
rguenther@suse.de
Thu Feb 8 17:16:00 GMT 2007
On Thu, 8 Feb 2007, Tobias Schlüter wrote:
> Richard Guenther wrote:
> > The other thing is to use by-value argument passing conventions for
> > internal intrinsics wherever possible so that a
> >
> > write (*,*) a
> >
> > does not make 'a' addressable. This is what makes fatigue so sensitive
> > to the partitioning choices - we have an addressable induction variable
> > and miss loop invariant motion of sin() and cos() calls if the memory
> > tag for the induction variable is coalesced with the wrong things. The
> > induction variable only has a memory tag because it is marked addressable
> > and this is only due to the fact that fatigue re-uses it in an I/O statement
> > (like the one quoted above) later in the function.
>
> Is there no finer-grained control available which says "this variable's
> address is taken, but it's not written to"? This seems useful for both
> passing structures in C code and INTENT(IN) arguments in Fortran code (where
> we can't use different calling conventions due to compatibility with legacy
> code).
No, the middle-end does not (yet) have support for such. It's not
impossible to add, though.
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
More information about the Fortran
mailing list