Related articles |
---|
Instruction scheduling with gcc on alpha denk@obelix.cica.es (1997-05-13) |
Re: Instruction scheduling with gcc on alpha jch@hazel.pwd.hp.com (John Haxby) (1997-05-22) |
Re: Instruction scheduling with gcc on alpha Robert.Harley@inria.fr (1997-06-13) |
Re: Instruction scheduling with gcc on alpha toon@moene.indiv.nluug.nl (Toon Moene) (1997-06-24) |
From: | Toon Moene <toon@moene.indiv.nluug.nl> |
Newsgroups: | comp.compilers |
Date: | 24 Jun 1997 23:42:46 -0400 |
Organization: | Moene Computational Physics, Maartensdijk, The Netherlands |
References: | 97-06-052 |
Keywords: | optimize |
Robert.Harley@inria.fr (Robert Harley) wrote:
>Claus Denk (denk@obelix.cica.es) writes:
>>I am just looking at the machine code created by gcc. I am interested
>>in simple floating vector operations, as for example:
>> for (i = 0; i< n; i++)
>> dy[i] = da*dx[i];
>>For pipelined architectures like the alpha, loop unrolling is
>>essential. [...]
>It is indeed, but neither gcc nor other compilers will do much with
>this because dx and dy might overlap. If you are sure they don't, you
>can qualify dx as 'const', use some 'no-aliasing' flag etc.
Or use Fortran (i.e., g77).
[ This is not really directed at Claus, because I _know_ he uses
Fortran, but the number of times one has to explain why Fortran code
can be compiled to faster code than C *just because of this single
language feature* is amazing.
Without specifying that dy and dx are not allowed to overlap, one
couldn't even write a vectorizing compiler ]
--
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.ai.mit.edu; NWP: http://www.knmi.nl/hirlam
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.