[LLVMdev] PTX backend, BSD license

Török Edwin edwintorok at gmail.com
Tue Aug 10 12:32:57 PDT 2010


On Tue, 10 Aug 2010 14:21:43 -0500
"Villmow, Micah" <Micah.Villmow at amd.com> wrote:

> 
> > -----Original Message-----
> > From: llvmdev-bounces at cs.uiuc.edu
> > [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of David A. Greene
> > Sent: Tuesday, August 10, 2010 12:05 PM
> > To: Helge Rhodin
> > Cc: llvmdev at cs.uiuc.edu
> > Subject: Re: [LLVMdev] PTX backend, BSD license
> > 
> > Helge Rhodin <helge.rhodin at alice-dsl.net> writes:
> > 
> > >> But I didn't study their code thoroughly, so I might be wrong
> > >> about
> > this.
> > >>
> > > Yes, we don't use the target-independent code generator and the
> > > backend is based on the CBackend.  We decided to not use the code
> > > generator because PTX code is also an intermediate language. The
> > > graphics driver contains a compiler which compiles PTX code to
> > machine
> > > code targeting a particular GPU architecture. It performs register
> > > allocation, instruction scheduling, dead-code elimination, and
> > > other late optimizations. Thus we don't need most of the
> > > target-independent code generator features in the PTXBackend.
> > 
> > Some of these could still be useful to aid the NVIDIA compiler.
> > But I don't have any hard data to support that assertion.  :)

> [Villmow, Micah] For the AMD backend that I work on, having these
> turned on are invaluable. If the NVIDIA compiler is anything like the
> ATI graphics compiler, it is written for speed and assumes smaller
> graphics kernels, but with more generic compute kernels, doing some
> preliminary optimizations/scheduling/allocation helps generate better
> code. 

I think AMD's stream SDK uses LLVM already, at least I've seen some llc
invocations and some amdil backend. I don't know if it compiles down to
GPU instructions or just to some IL which is then compiled again.
Unfortunately its not open source, and it only works with fglrx, not
Mesa so I stopped looking further.

http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=120683&%20enterthread=y

Best regards,
--Edwin



More information about the llvm-dev mailing list