[LLVMdev] Adding register allocator to LLVM
Anton Vayvod
avayvod at gmail.com
Sun Aug 20 06:18:48 PDT 2006
Hi!
I've did what Jim Laskey wrote but llc didn't reckognize my regalloc option.
So I moved my allocator implementation into seperate folder within CodeGen
and wrote separate makefile for it (like in "Writing an LLVM pass"
tutorial). But when I run "make" from LLVMOBJDIR it doesn't enter the
RegAlloc directory and when linking llc an error like
"createGraphColoringRegAlloc not defined" occurs.
What am I doing wrong? :)
On 8/3/06, Chris Lattner <sabre at nondot.org> wrote:
> On Thu, 3 Aug 2006, Jim Laskey wrote:
> > To force the load/linking of your register allocator into the llc/lli
> tools,
> > add your create function's global declaration to "Passes.h" and add a
> > "pseudo" call line to "llvm/Codegen/LinkAllCodegenComponents.h" .
>
> Another note: with this new functionality you should be able to
> dynamically load register allocators. Build your register allocator into
> a dynamic library, like this:
> http://llvm.org/docs/WritingAnLLVMPass.html#makefile
>
> They you should be able to use:
>
> llc -load yourregalloc.so -regalloc=yours ...
>
> -Chris
BTW, do you know what the extension cygwin uses instead of ".so"?
Thanks,
Tony.
--
Nae king! Nae quin! Nae laird! Nae master! We willnae be fooled again!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060820/b3a00b49/attachment.html>
More information about the llvm-dev
mailing list