This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A bit of vector extension documentation
- To: Diego Novillo <dnovillo at redhat dot com>
- Subject: Re: A bit of vector extension documentation
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Fri, 28 Sep 2001 21:12:14 +0200
- CC: David Edelsohn <dje at watson dot ibm dot com>, Richard Henderson <rth at redhat dot com>, Daniel Berlin <dan at cgsoftware dot com>, Daniel Egger <degger at fhm dot edu>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <rth@redhat.com> <200109281712.NAA23750@makai.watson.ibm.com> <20010928132532.A10203@tornado.cygnus.com>
Diego Novillo wrote:
> On Fri, 28 Sep 2001, David Edelsohn wrote:
> > I thought the point of the paper is that it is a generalization
> > that does not require loops. For SIMD, as opposed to vector,
> > architectures, it might be better because it can take advantage of such
> > instructions without the loop setup overhead.
> >
> Yes, the paper does not attempt to design a vectorizing compiler.
> It merely points out that in several cases you can get away with
> converting sequence of expressions into SIMD instructions. They
> do have the limitation of working on single basic blocks, though.
Hmmm, wouldn't that already help on most of the interesting Fortran
loops, when unrolled (i.e., when "converting sequences of expressions
into SIMD instructions" is performed after loop unrolling) ?
Consider
DO I = 1, N
A(I) = B(I) + C(I)
ENDDO
and its unrolled cousin
DO I = 1, N, 4
A(I+0) = B(I+0) + C(I+0)
A(I+1) = B(I+1) + C(I+1)
A(I+2) = B(I+2) + C(I+2)
A(I+3) = B(I+3) + C(I+3)
ENDDO
Certainly the loop body in both examples is a single basic block.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)