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

Che-Liang Chiou clchiou at gmail.com
Tue Mar 8 05:50:47 PST 2011


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.

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
>




More information about the llvm-commits mailing list