<div dir="ltr">Hi Nikolaos,<div><br></div><div>Following commands work great for me. </div><div>$ clang -S -emit-llvm -target nvptx -x cl -include clc/clctypes.h ../data-types/<a href="http://scalar.cl">scalar.cl</a></div>
<div>$ llc -mcpu=sm_30 scalar.s</div><div><br></div><div style>You can follow Justin's blog [1]. It helped me a lot to understand where to start.</div><div style><br></div><div style>[1] <a href="http://jholewinski.org/blog/llvm-3-0-ptx-backend/">http://jholewinski.org/blog/llvm-3-0-ptx-backend/</a></div>
<div style><br></div><div style>Best,</div><div style>Ankur</div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 11:40 PM, Justin Holewinski <span dir="ltr"><<a href="mailto:justin.holewinski@gmail.com" target="_blank">justin.holewinski@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="im">On Mon, Feb 4, 2013 at 1:09 PM, <span dir="ltr"><<a href="mailto:nkavv@physics.auth.gr" target="_blank">nkavv@physics.auth.gr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Justin,<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Has anyone had similar problems with the NVPTX backend? Shouldn't this<br>
code be linked to the AsmPrinter library for NVPTX (already)?<br>
</blockquote>
<br>
What do you mean by "doesn't work"? The AsmPrinter library really houses<br>
the MCInst printer, which isn't implemented for NVPTX yet. The older<br>
assembly printer works just fine. This is transparent to users. The NVPTX<br>
target can be used just like MIPS and X86 with llc (and library users).<br>
<br>
Is llc saying nvptx is an invalid target? If so, you probably built LLVM<br>
without NVPTX.<br>
</blockquote>
<br></div>
I've used -enable-targets=all, and all libLLVMNVPTX*.a libs were produced. However, the AsmPrinter one looks dummy.<br>
<br>
Further, nvptx appears as a registered target when running llc --version.<br>
<br>
llc doesn't complain, but just "runs" forever with apparently no output</blockquote><div><br></div></div><div>Can you post the llc command line you're using? Can you post an LLVM IR file that causes this behavior?<br>
</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
BTW I've built LLVM with mingw (strange mixture of gcc-3.4.5 and<br>
g++-4.6.1). Native compilation, MIPS backend and other things that i've<br>
tested, all work properly.<br>
</blockquote>
<br>
Perhaps this "strange mixture" is causing some symbol errors somewhere.<br>
Can you post the exact sequence of steps you used to build LLVM, along with<br>
the llc command-line that fails for you?<br>
</blockquote>
<br></div>
My configuration options were:<br>
<br>
--prefix=/my/local/path/or/so --enable-shared --enable-targets=all --enable-optimized --disable-libffi --disable-debug-runtime --disable-assertions --disable-expensive-checks<br>
<br>
Following configuration i did the typical make and make install (to a selected path by --prefix.<br>
<br>
<br>
Best regards<br>
Nikolaos Kavvadias<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
<br>
Any help is appreciated.<br>
<br>
Best regards,<br>
Nikolaos Kavvadias<br>
<br>
<br>
<br></div>
______________________________<u></u>**_________________<div><br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
</div><a href="http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/**<u></u>mailman/listinfo/llvmdev</a><<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http:<u></u>//lists.cs.uiuc.edu/mailman/<u></u>listinfo/llvmdev</a>><br>
<br>
</blockquote>
<br>
<br><span><font color="#888888">
<br>
--<br>
<br>
Thanks,<br>
<br>
Justin Holewinski<br>
<br>
</font></span></blockquote>
<br>
<br>
<br>
</blockquote></div></div><span class=""><font color="#888888"><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</font></span></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div></div>