This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC for Mac OS X
> Hmmm, do I read correctly, between the lines, here that generating
> vector code is dependent on support by frontends - bummer, that would
> mean that the following obvious Fortran candidate code isn't improved at
> all:
>
> subroutine saxpy(x,a,y,n)
> dimension x(n), y(n)
> do i = 1, n
> y(i) = y(i) + a * x(i)
> enddo
> end
>
> ?
>
> [ I hope the answer is no ;-) ]
As I understand it: the altivec patches to gcc do NOT perform automatic
vectorization (loop unrolling). The code above is NOT altivec ready.
Altivec defines additional assembly instructions that operate on an extended
data types called "vector" and "matrix", much like "float" is defined in
regular c. The operators are overloaded to perform the arithmetic, much like
a C++ library that defines vector types and overloads the obvious operators.
Thanks A Bunch! David Young; VVI-DCS
dyoung@vvi.com