[LLVMdev] Adding an object to llc

Chris Lattner sabre at nondot.org
Tue May 23 11:08:04 PDT 2006


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/




More information about the llvm-dev mailing list