<div class="gmail_quote">On Tue, Mar 8, 2011 at 8:50 AM, Che-Liang Chiou <span dir="ltr"><<a href="mailto:clchiou@gmail.com">clchiou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Justin,<br>
<br>
Your patch is generally okay, but there is one thing that bothers me.<br>
The patch does not utilize codegen framework's predicate support. For<br>
instance, the BRANCH_COND instruction explicitly takes a predicate<br>
register.<br>
<br>
The problems of not using framework's support includes:<br>
<br>
* The number of instruction defined in PTXInstrInfo.td will be doubled<br>
because all instructions have to have a predicated and non-predicated<br>
version (PTX is a fully-predicated language). Just like BRANCH and<br>
BRANCH_COND in the patch. On the other hand, this patch would be okay<br>
if it is intended that PTX backend only supports limited predication.<br>
<br>
* The PTX backend cannot benefit from LLVM's optimizations like branch folding.<br></blockquote><div><br></div><div>I'm not too familiar with the built-in support for instruction predicates.  I'll try to refactor this.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Other parts of the patch (set.p instruction and non-predicated version<br>
of branch instruction) looks good to me. You may commit that part of<br>
the patch.<br>
<br>
Regards,<br>
<font color="#888888">Che-Liang<br>
</font><div><div></div><div class="h5"><br>
On Tue, Mar 8, 2011 at 12:41 AM, Justin Holewinski<br>
<<a href="mailto:justin.holewinski@gmail.com">justin.holewinski@gmail.com</a>> wrote:<br>
> This patch adds preliminary branch support for the PTX backend.  Unsigned<br>
> integer comparison is supported, and predicated branches are emitted for<br>
> conditional branches.<br>
> Che-Liang,<br>
> Is this patch okay to commit?<br>
><br>
> --<br>
><br>
> Thanks,<br>
> Justin Holewinski<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>