On 11/15/2014 02:04 AM, Martin Jambor wrote:

Hi,

this patch adds very simple propagation of alignment of pointers to
IPA-CP.  Because I have not attempted to estimate profitability of
such propagation in any way, it does not do any cloning, just
propagation when the alignment is known and the same in all contexts.

Thanks for this improvement !

From the Fortran side, arrays can be "created" in the following ways:

1. Statically in the main program.

2. As a subroutine-temporary "automatic array".

3. By allocating an allocatable array.

Arrays under 1. are aligned properly by the compiler.

Arrays under 2. are aligned properly because of the proper alignment of the stack nowadays.

Arrays under 3. are aligned properly because Fortran "ALLOCATE" ultimately calls malloc.

So Fortran arrays are always suitably aligned (the exception being an array actual argument passed as "CALL SUB(.., A(2:), ..)", which is extremely rare).

So this propagation of alignment information will result in basically removing all alignment peeling for Fortran code.

Thanks !

--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news

Reply via email to