<div class="gmail_quote">On Mon, Aug 29, 2011 at 7:43 AM, Adarsh HV <span dir="ltr"><<a href="mailto:adarsh.hv99@gmail.com">adarsh.hv99@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi everyone,<br>
I downloaded the latest version of LLVM PTX backend from<br>
<a href="http://www.prog.uni-saarland.de/projects/anysl" target="_blank">http://www.prog.uni-saarland.de/projects/anysl</a><br>
 and made the required changes to all the files mentioned in the README. But<br>
I get the following error when I compile it.<br>
llvm[3]: Compiling PTXBackend.cpp for Release build<br>
In file included from PTXBackend.h:70:0,<br>
                 from PTXBackend.cpp:36:<br>
PTXPasses.h: In constructor<br>
‘PTXBackendInsertSpecialInstructions::PTXBackendInsertSpecialInstructions(std::map<const<br>
llvm::Value*, const llvm::Value*>&)’:<br>
PTXPasses.h:93:63: error: no matching function for call to<br>
‘llvm::BasicBlockPass::BasicBlockPass(char*)’<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:321:12: note:<br>
candidates are: llvm::BasicBlockPass::BasicBlockPass(char&)<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:319:36: note:<br>
llvm::BasicBlockPass::BasicBlockPass(const llvm::BasicBlockPass&)<br>
PTXPasses.h: In constructor<br>
‘PTXPolishBeforeCodegenPass::PTXPolishBeforeCodegenPass()’:<br>
PTXPasses.h:151:24: error: no matching function for call to<br>
‘llvm::BasicBlockPass::BasicBlockPass(char*)’<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:321:12: note:<br>
candidates are: llvm::BasicBlockPass::BasicBlockPass(char&)<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:319:36: note:<br>
llvm::BasicBlockPass::BasicBlockPass(const llvm::BasicBlockPass&)<br>
PTXPasses.h: In constructor<br>
‘PTXBackendNameAllUsedStructsAndMergeFunctions::PTXBackendNameAllUsedStructsAndMergeFunctions()’:<br>
PTXPasses.h:197:21: error: no matching function for call to<br>
‘llvm::ModulePass::ModulePass(char*)’<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:235:12: note:<br>
candidates are: llvm::ModulePass::ModulePass(char&)<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:220:32: note:<br>
llvm::ModulePass::ModulePass(const llvm::ModulePass&)<br>
In file included from PTXBackend.cpp:36:0:<br>
PTXBackend.h: In constructor<br>
‘PTXWriter::PTXWriter(llvm::formatted_raw_ostream&, std::map<const<br>
llvm::Value*, const llvm::Value*>&)’:<br>
PTXBackend.h:114:30: error: no matching function for call to<br>
‘llvm::FunctionPass::FunctionPass(char*)’<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:280:12: note:<br>
candidates are: llvm::FunctionPass::FunctionPass(char&)<br>
/home/neelima/Documents/llvm-2.9/include/llvm/Pass.h:278:34: note:<br>
llvm::FunctionPass::FunctionPass(const llvm::FunctionPass&)<br>
PTXBackend.h: In member function ‘bool PTXWriter::isAddressExposed(const<br>
llvm::Value*) const’:<br>
PTXBackend.h:386:5: warning: no return statement in function returning<br>
non-void<br>
PTXBackend.h: In static member function ‘static bool<br>
PTXWriter::isInlinableInst(const llvm::Instruction&)’:<br>
PTXBackend.h:395:5: warning: no return statement in function returning<br>
non-void<br>
PTXBackend.h: In member function ‘std::string<br>
PTXWriter::getAddressSpace(const llvm::Value*)’:<br>
PTXBackend.h:556:40: error: ‘const class llvm::Value’ has no member named<br>
‘getUnderlyingObject’<br>
PTXBackend.cpp: In member function ‘virtual bool<br>
PTXWriter::doInitialization(llvm::Module&)’:<br>
PTXBackend.cpp:432:29: error: no matching function for call to<br>
‘llvm::MCContext::MCContext(const llvm::MCAsmInfo&)’<br>
/home/neelima/Documents/llvm-2.9/include/llvm/MC/MCContext.h:105:14: note:<br>
candidates are: llvm::MCContext::MCContext(const llvm::MCAsmInfo&, const<br>
llvm::TargetAsmInfo*)<br>
/home/neelima/Documents/llvm-2.9/include/llvm/MC/MCContext.h:40:5: note:<br>
llvm::MCContext::MCContext(const llvm::MCContext&)<br>
PTXBackend.cpp: In member function ‘std::string<br>
PTXWriter::getOperandStr(const llvm::Value*)’:<br>
PTXBackend.cpp:379:1: warning: control reaches end of non-void function<br>
/bin/rm: cannot remove<br>
`/home/neelima/Documents/llvm-2.9/lib/Target/PTXBackend/Release/PTXBackend.d.tmp':<br>
No such file or directory<br>
make[3]: ***<br>
[/home/neelima/Documents/llvm-2.9/lib/Target/PTXBackend/Release/PTXBackend.o]<br>
Error 1<br>
make[3]: Leaving directory<br>
`/home/neelima/Documents/llvm-2.9/lib/Target/PTXBackend'<br>
make[2]: *** [PTXBackend/.makeall] Error 2<br>
make[2]: Leaving directory `/home/neelima/Documents/llvm-2.9/lib/Target'<br>
make[1]: *** [Target/.makeall] Error 2<br>
make[1]: Leaving directory `/home/neelima/Documents/llvm-2.9/lib'<br>
make: *** [all] Error 1<br>
<br>
<br>
Sorry to post such a large piece of the debug info, but i am a beginner and<br>
do not know which part  will help in debugging it.<br>
Thank You:)<br></blockquote><div><br></div><div>Looks like a version conflict between your local LLVM sources and the LLVM version this was written against. I would ask them to give you a specific LLVM revision number, then you can check out that specific version.</div>
<div><br></div><div>Also, depending on what you need, LLVM now has a built-in PTX back-end.  It's not quite robust yet, but it is capable of compiling a wide range of compute code.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Helge Rhodin wrote:<br>
><br>
> Hey everybody,<br>
><br>
> good news for everyone interested in the PTX backend:<br>
> We decided to release the current source code under the GPL - you can<br>
> find the latest tarball here:<br>
><br>
> <a href="http://www.prog.uni-saarland.de/projects/anysl" target="_blank">http://www.prog.uni-saarland.de/projects/anysl</a><br>
><br>
> You will find the README in the attachment, which should hopefully<br>
> answer a lot of questions concerning the implementation and the current<br>
> status.<br>
><br>
> If you have further questions, comments, or suggestions, feel free to<br>
> contact us directly or respond on the list.<br>
><br>
> We would also like to know if there are any major obstacles to merging<br>
> the code into LLVM trunk (apart from coding standards  ;)  ).<br>
><br>
> Best regards,<br>
> Helge Rhodin and Ralf Karrenberg<br>
><br>
><br>
><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>
><br>
<br>
--<br>
View this message in context: <a href="http://old.nabble.com/PTX-target-for-LLVM%21-tp28376690p32356202.html" target="_blank">http://old.nabble.com/PTX-target-for-LLVM%21-tp28376690p32356202.html</a><br>
Sent from the LLVM - Dev mailing list archive at Nabble.com.<br>
<br>
<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>