Hi I have just written an pass which does some simple ASAP scheduling. First i registered it as optimization pass because it so nice documented and speeds up the compilation and testing times dramaticly :-). Then i just registered this part as an analysis part which should be used in a modified cbackend. All seems to work fine, exept that llc fails to link. I tried removing the SHARED_LIBRARY = 1 and LOADABLE_MODULE= 1 options from the Makefile since it should be included by default in my build. Then i tried to add the .a file to the llc makefile. But it didn't help either... :-( Any hints what's missing? Btw. there was a way to make the makefile run more verbose. It was documented somewhere but i don't find it anymore? (S.t. like debug=1 make) Thanks ST
On Tue, 2006-05-23 at 18:07 +0200, Silken Tiger wrote:> Btw. there was a way to make the makefile run more verbose. It was documented > somewhere but i don't find it anymore? (S.t. like debug=1 make)make VERBOSE=1 :) Andrew
On Tue, 2006-05-23 at 18:07 +0200, Silken Tiger wrote:> Hi > > I have just written an pass which does some simple ASAP scheduling. First i > registered it as optimization pass because it so nice documented and speeds > up the compilation and testing times dramaticly :-). > > Then i just registered this part as an analysis part which should be used in a > modified cbackend. All seems to work fine, exept that llc fails to link. I > tried removing the SHARED_LIBRARY = 1 and LOADABLE_MODULE= 1 options from the > Makefile since it should be included by default in my build. Then i tried to > add the .a file to the llc makefile. But it didn't help either... :-( Any > hints what's missing?Its hard to say without knowing the error you got. Can you provide the link error that was generated?> > Btw. there was a way to make the makefile run more verbose. It was documented > somewhere but i don't find it anymore? (S.t. like debug=1 make)The option is: make VERBOSE=1 Reid -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060523/9a8bf013/attachment.sig>
On Tue, 23 May 2006, Silken Tiger wrote:> I have just written an pass which does some simple ASAP scheduling. First i > registered it as optimization pass because it so nice documented and speeds > up the compilation and testing times dramaticly :-).Ok, so this is an LLVM->LLVM pass?> Then i just registered this part as an analysis part which should be used in a > modified cbackend. All seems to work fine, exept that llc fails to link. I > tried removing the SHARED_LIBRARY = 1 and LOADABLE_MODULE= 1 options from the > Makefile since it should be included by default in my build. Then i tried to > add the .a file to the llc makefile. But it didn't help either... :-( Any > hints what's missing?I'm not sure, this is too vauge to give you specific directions. Note that LLC isn't set up to dynamically load passes. Is there any reason you can't use 'opt -yourpass | llc'? If you really have to have it in llc, you can modify the C backend's CTargetMachine::addPassesToEmitFile method to include your pass. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Hi Thanks for all your feedback. I just found the reason for the compile failure for my analysis pass: I had to add my object to the namespace llvm instead of anonymous. This took me some time since i was looking for an linking failure... but as errors go i should have looked at the error message a little closer. So for all those trying to add an analysis path: * add the object name to the USEDLIBS variable in the tools/llc/Makefile * use the llvm namespace instead of anonyous This mail is intended as references for people using the search engines, prior to asking questions :-). But maybe this information could also be added to http://llvm.org/docs/WritingAnLLVMPass.html? Thanks ST