[llvm-commits] [PATCH] PTX: Add preliminary branch support, including integer comparison operations involving unsigned integers.

Justin Holewinski justin.holewinski at gmail.com
Tue Mar 8 06:23:16 PST 2011


On Tue, Mar 8, 2011 at 8:50 AM, Che-Liang Chiou <clchiou at gmail.com> wrote:

> Hi Justin,
>
> Your patch is generally okay, but there is one thing that bothers me.
> The patch does not utilize codegen framework's predicate support. For
> instance, the BRANCH_COND instruction explicitly takes a predicate
> register.
>
> The problems of not using framework's support includes:
>
> * The number of instruction defined in PTXInstrInfo.td will be doubled
> because all instructions have to have a predicated and non-predicated
> version (PTX is a fully-predicated language). Just like BRANCH and
> BRANCH_COND in the patch. On the other hand, this patch would be okay
> if it is intended that PTX backend only supports limited predication.
>
> * The PTX backend cannot benefit from LLVM's optimizations like branch
> folding.
>

I'm not too familiar with the built-in support for instruction predicates.
 I'll try to refactor this.


>
> Other parts of the patch (set.p instruction and non-predicated version
> of branch instruction) looks good to me. You may commit that part of
> the patch.
>
> Regards,
> Che-Liang
>
> On Tue, Mar 8, 2011 at 12:41 AM, Justin Holewinski
> <justin.holewinski at gmail.com> wrote:
> > This patch adds preliminary branch support for the PTX backend.  Unsigned
> > integer comparison is supported, and predicated branches are emitted for
> > conditional branches.
> > Che-Liang,
> > Is this patch okay to commit?
> >
> > --
> >
> > Thanks,
> > Justin Holewinski
> >
>



-- 

Thanks,

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


More information about the llvm-commits mailing list