From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toon Moene To: Diego Novillo Cc: David Edelsohn , Richard Henderson , Daniel Berlin , Daniel Egger , gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: A bit of vector extension documentation Date: Fri, 28 Sep 2001 12:11:00 -0000 Message-id: <3BB4CB8E.DF6B40F4@moene.indiv.nluug.nl> References: <200109281712.NAA23750@makai.watson.ibm.com> <20010928132532.A10203@tornado.cygnus.com> X-SW-Source: 2001-09/msg01204.html 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)