On Saturday 03 April 2010 17:17:46 Luca Barbieri wrote:
> >> (2) Write a LLVM->TGSI backend, restricted to programs without any
> >> control flow
> >
> > I think (2) is probably the closest to what I am proposing, and it is
> > something I can take a look at.
<snip>
> By the way, it would be interesting to know what people who are
> working on related things think about this (CCed them).
> In particular, Zack Rusin has worked extensively with LLVM and I think
> a prototype OpenCL implementation.

>From the compute support LLVM->TGSI translation isn't even about 
optimizations, it's about "working". Writing a full C/C++ compiler that 
generates TGSI is a lot less realistic than reusing Clang and writing a TGSI 
code-generator for it. 
So the LLVM code-generator for TGSI would be a very high impact project for 
Gallium. Obviously a code-generator that can handle control-flow (to be honest 
I'm really not sure why you want to restrict it to something without control-
flow in the first place).

Having said that I'm not sure whether this is something that's a good GSOC 
project. It's a fairly difficult piece of code to write. One that to do right 
will depend on adding some features to TGSI (a good source of inspiration for 
those would be AMD's CAL and NVIDIA's PTX 
http://developer.amd.com/gpu_assets/ATI_Intermediate_Language_(IL)_Specification_v2b.pdf
http://www.nvidia.com/content/CUDA-ptx_isa_1.4.pdf )

I thought the initial proposal was likely a lot more feasible for a GSOC (of 
course there one has to point out that Mesa's GLSL compiler already does 
unroll loops and in general simplifies control-flow so the points #1 and #2 are 
largely no-ops, but surely there's enough work on Gallium Radeon's drivers 
left to keep Tom busy). Otherwise having a well-defined and reduced scope with 
clear deliverables would be rather necessary for LLVM->TGSI code because that 
is not something that you could get rock solid over a summer.

z

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to