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]
Other format: [Raw text]

Re: upcoming SSE/SSE2 support in 3.1



On Thursday, May 9, 2002, at 05:07 , Jim Wray wrote:
> In other words, a typical operation would be to
> iteratively go through data that is consecutive in memory with two 
> sources
> and a destination.  Is this likely to get SSE(2) code generated
> automatically, or should I spend time looking at writing custom 
> assembly.

In order to make it possible to have any vectorization, you should start
to make sure all your data is properly aligned and that the compiler 
knows
about this. Also you should take care to write the code such that it is
clear (for the compiler) that there can be no possible aliasing issues.
This is not trivial, but will likely result in speedups already without
using specific SSE/SSE2 instructions.

The last step of actually using the vector instructions is relatively 
easy, and can be done using Asm inserts for now, or automatically by the 
compiler later. The step of laying out your data and designing your 
functions to
meet the aliasing and alignment requirements as described above is 
something
that compilers in general will not be able to do for you however.

   -Geert


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