[llvm-commits] RFC: Add R600/SI backend as an experimental target

Justin Holewinski justin.holewinski at gmail.com
Tue Sep 11 05:55:29 PDT 2012


Awesome!  So what's stopping this from being committed as an experimental
back-end?

On Mon, Sep 10, 2012 at 10:13 AM, Tom Stellard <tom at stellard.net> wrote:

> On Sun, Sep 09, 2012 at 01:15:50PM -0400, Justin Holewinski wrote:
> > The back-end builds fine for me!
> >
> > I haven't done extensive testing, but it looks like there is some issue
> > with the way registers are defined.  In text output, I am getting
> > placeholders instead of actual numbers:
> >
> > jholewinski at rapture [R600]$ llc -march=r600 -mcpu=redwood <
> > llvm.AMDGPU.pow.ll
> > .text
> > ; BB#0:
> > LOG_IEEE T#Index#.#Chan, T#Index#.#Chan (Pred_sel_off)
> > MUL NON-IEEE T#Index#.#Chan, T#Index#.#Chan, T#Index#.#Chan
> > EXP_IEEE T#Index#.#Chan, T#Index#.#Chan (Pred_sel_off)
> > RETURN
> >
> >
>
> Hi Justin,
>
> Thanks for taking the time to test this out.  It looks like I made a
> mistake when I updated the R600RegisterInfo.td files.  I've attached a
> few patches that should fix this issue and others I noticed while going
> through the code.  I also changed the tests to check the register names.
> These patches can also be found in my r600-review-v9 branch.
>
> -Tom
>
>
> > On Fri, Sep 7, 2012 at 4:35 PM, Tom Stellard <tom at stellard.net> wrote:
> >
> > > Hi,
> > >
> > > Attached is a patch with an updated version of the R600/SI backend.
>  The
> > > same code can also be found in the r600-review-v9 branch here:
> > > http://cgit.freedesktop.org/~tstellar/llvm/
> > >
> > > Changes since last week's version include:
> > >  +  Lots of fixes and new features for Southern Islands GPUs.
> > >  +  The *RegisterInfo.td files have been updated to use newer features
> > >     of tablegen and they no longer need to be generated with perl
> > >     scripts. This change reduces the size of the patch by around
> ~100kb.
> > >
> > > I'm still hoping to get this accepted as an experimental backend, and I
> > > look forward to your comments.
> > >
> > > Thanks,
> > > Tom Stellard
> > >
> > >
> > > On Fri, Aug 31, 2012 at 03:18:17PM -0400, Tom Stellard wrote:
> > > > Hi,
> > > >
> > > > I've attached a patch with an updated version of the R600/SI backend.
> > > > This time I've squashed all the changes into a single patch and used
> a
> > > > format that is compatible with svn for easier testing/reviewing.
> > > >
> > > > Since the last version, I've fixed some build errors caused by recent
> > > > tablegen changes, and I've also gone through and fixed all the
> > > > errors caused by setting InstrInfo.guessInstructionProperties = 0.
> > > >
> > > > If you prefer git, this code can also be found in the r600-review-v8
> > > > branch here: http://cgit.freedesktop.org/~tstellar/llvm/
> > > >
> > > > I'm still interested in getting this code into the main tree as an
> > > > experimental target, so I'd appreciate any feedback on whether or not
> > > > this backend is ready to be accepted as an experimental target.
> > > >
> > > > Thanks,
> > > > Tom Stellard
> > > >
> > > > On Mon, Aug 27, 2012 at 02:46:06PM +0000, Tom Stellard wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > Here is an updated version of the R600/SI backend that I would
> like to
> > > > > be considered for inclusion in the LLVM main tree as an
> experimental[1]
> > > > > target.
> > > > >
> > > > > Changes since the last version include:
> > > > >   + Added AsmPrinter
> > > > >   + Converted Tests to use AsmPrinter
> > > > >   + Replaced CodeEmitters with MCCodeEmitters
> > > > >   + Removed all uses of MachineOperands flags
> > > > >   + Enabled the If Conversion pass on R600
> > > > >   + Various clean ups and bug fixes.
> > > > >
> > > > > For more information about the backend, here are some frequently
> asked
> > > > > questions:
> > > > >
> > > > > ++ What is the R600/SI backend?
> > > > >
> > > > >   The R600/SI backend is a code generator for AMD GPUs and supports
> > > > >   the HD2XXX-HD7XXX GPU models.  It is currently being used by the
> > > > >   Open Source graphics drivers for AMD GPUs in the Mesa[2] project
> as
> > > > >   a compiler backend for graphics and compute shaders.
> > > > >
> > > > > ++ How will the R600/SI backend benefit LLVM?
> > > > >
> > > > >   The R600/SI backend is a native code generator for GPUs.  There
> are
> > > > >   very few completely Open Source compiler backends for GPUs, so
> > > > >   adding this backend to LLVM will give the project a leg up over
> other
> > > > >   compiler projects and help attract the attention of researchers
> and
> > > > >   new developers.
> > > > >
> > > > > ++ Why do the R600/SI developers want this code in the main LLVM
> tree?
> > > > >
> > > > >   The main reason for this is to reduce the maintenance burden on
> > > > >   developers so they have more time to spend improving the backend
> and
> > > > >   core LLVM code.  Supporting multiple versions of LLVM in the Mesa
> > > > >   tree will require a lot of ugly ifdefs, and it will be very
> difficult
> > > > >   to take advantage of new features in Tablegen.  Also, changes to
> the
> > > > >   backend will require testing against at least two version of
> LLVM.
> > > > >   Moving the backend code into the main LLVM tree will allow the
> > > > >   backend to evolve with the rest of the project and remove these
> > > > >   extra burdens from developers.
> > > > >
> > > > > ++ What is the planned development model for the R600/SI backend?
> > > > >
> > > > >   If accepted into the main tree, all development on the R600/SI
> will
> > > be based
> > > > >   on the public LLVM tree.  The backend has been Open Source from
> the
> > > beginning
> > > > >   and there are no private internal trees.  All code developed for
> > > this backend
> > > > >   is pushed to the public tree as soon as it is ready.
> > > > >
> > > > > Looking forward to you comments.
> > > > >
> > > > > Thanks,
> > > > > Tom Stellard
> > > > >
> > > > > [1]
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-July/051929.html
> > > > > [2] http://www.mesa3d.org
> > > > > _______________________________________________
> > > > > llvm-commits mailing list
> > > > > llvm-commits at cs.uiuc.edu
> > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > >
> > >
> > > _______________________________________________
> > > llvm-commits mailing list
> > > llvm-commits at cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > >
> > >
> >
> >
> > --
> >
> > Thanks,
> >
> > Justin Holewinski
>



-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120911/3c9609c7/attachment.html>


More information about the llvm-commits mailing list