<div dir="ltr">Hey Bahram,<div><br></div><div>For the first part (recognize CUDA tokens), look in the clang/test/SemaCUDA directory for how clang is invoked to parse CUDA tokens (clang/test/SemaCUDA/<a href="http://function-target-hd.cu">function-target-hd.cu</a> shows invocation variants). There is also some support already to query the AST for CUDA nodes. For example, a kernel launch (<<<,>>>) is matched by the AST matcher cudaKernelCallExpr.</div><div><br></div><div>Can you expand more on the bitcode part? I'm not quite following the flow of what your tool does, i.e., what does it take as input and what do you wish to generate with it?</div><div><br></div><div>Best,</div><div><br></div><div>Jacques</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 30, 2015 at 3:25 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br><!--
--><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">+jacques to pull in the right people to get you started<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 30, 2015 at 11:48 AM Bahram Yarahmadi via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 30, 2015 at 11:37 AM, Bahram Yarahmadi <span dir="ltr"><<a href="mailto:bahram.yarahmadi@gmail.com" target="_blank">bahram.yarahmadi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div> Hello everyone, <br></div>I want to write a tool to do some modification in a Cuda C program ,my <!--
-->program must receive a cuda c program as its input and then do some modification on its AST and then in its bitcode <br></div>I have a problem in reading such files (.cu) clang does not recognize some tokens in cuda C language (like <<<)  and it does not generate a proper output for kernel functions after i try to transfer my bitcode to ptx ,<br></div>Does anyone here that have a good manual that can help me out through this pipeline  ?<br><br></div><br><div><div><div><div>Special thanck in advance,<br><br></div></div></div></div></div>
</blockquote></div><br></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>
</blockquote></div><br></div></div>