[LLVMdev] Problem with PTX assembly printing (NVPTX backend)

Justin Holewinski justin.holewinski at gmail.com
Mon Feb 4 09:52:41 PST 2013


On Mon, Feb 4, 2013 at 10:46 AM, <nkavv at physics.auth.gr> wrote:

> Hi all,
>
> I'm trying to use the newly added (in LLVM 3.2) NVPTX backend for
> producing PTX (Parallel Thread eXecution) assembly from simple C programs.
>
> While using llc with -march for mips and x86 works, -march=nvptx doesn't
> work. This seems reasonable since I can see that the
> libLLVMNVPTXAsmPrinter.a library is about 500 bytes (thus empty). However,
> the strange thing is that AsmPrinter code can be found in the NVPTX backend
> directory. I would expect that this code would be compiled to the
> corresponding assembly printing library.
>
> Has anyone had similar problems with the NVPTX backend? Shouldn't this
> code be linked to the AsmPrinter library for NVPTX (already)?
>

What do you mean by "doesn't work"?  The AsmPrinter library really houses
the MCInst printer, which isn't implemented for NVPTX yet.  The older
assembly printer works just fine.  This is transparent to users.  The NVPTX
target can be used just like MIPS and X86 with llc (and library users).

Is llc saying nvptx is an invalid target?  If so, you probably built LLVM
without NVPTX.


>
> BTW I've built LLVM with mingw (strange mixture of gcc-3.4.5 and
> g++-4.6.1). Native compilation, MIPS backend and other things that i've
> tested, all work properly.
>

Perhaps this "strange mixture" is causing some symbol errors somewhere.
Can you post the exact sequence of steps you used to build LLVM, along with
the llc command-line that fails for you?


>
> Any help is appreciated.
>
> Best regards,
> Nikolaos Kavvadias
>
>
>
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>



-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130204/d39e9c47/attachment.html>


More information about the llvm-dev mailing list