On Monday 21 May 2007 03:11:28 pm Keith Whitwell wrote:
> > It seems that either the LLVM IR would need some extensions for those
> > things or the back-end code generator/instruction selector would have to
> > look for patterns of scalar instructions and figure out where vector ops
> > should be used.  The later sounds unpleasant.
>
> Yes, approximately 50% of the time, we need to preserve the vector
> semantics.  The other 50% of the time, we need to convert vector
> operations to scalar ones.

Right :) That's exactly what we'll need the lowering pass for (the one that I 
wanted to commit last week ;) ). Basically the way I envisioned it is that 
we'd have a general module wide lowering pass (LLVM has a real nice framework 
for running passes over the module) that can be controlled by the driver. So 
the driver marks the things that need to be lowered (decomposed) for it, 
everything else basically stays as a builtin. 

That of course works really nicely in the hardware case and is a little more 
problematic in the software-only case (because the default llvm 
code-generator won't understand those not-lowered builtins). So for all the 
things we'll be missing and can be done reasonably with vectors all the way 
we'll add llvm intrinsics (which is pretty trivial to do and gives us the 
flexibility we'll need).
And most likely we should push for some of them to be folded back in llvm but 
that's something for the future.

Zack

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to