This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A bit of vector extension documentation


To make it pay off on the Intel SIMD architectures, the compiler
must be able to analyze alignments, allocate arrays on 16-byte
boundaries, and pre-condition loops so that a majority of
operands are 16-byte aligned in the unrolled body of the loop.
Maybe this fits with the typical programming practice of writing
specific code for each architecture when the loops are just the
size of a SIMD instruction, and looking for compiler
vectorization of loops which conform to standard syntax when they
are believed to be long enough.
----- Original Message -----
From: "Toon Moene" <toon@moene.indiv.nluug.nl>
To: "Diego Novillo" <dnovillo@redhat.com>
Cc: "David Edelsohn" <dje@watson.ibm.com>; "Richard Henderson"
<rth@redhat.com>; "Daniel Berlin" <dan@cgsoftware.com>; "Daniel
Egger" <degger@fhm.edu>; <gcc-patches@gcc.gnu.org>;
<gcc@gcc.gnu.org>
Sent: Friday, September 28, 2001 12:12 PM
Subject: Re: A bit of vector extension documentation


> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]