Thank you for the answer Reid.
I've been already using the format `opt -load MyPass.so -my-pass input.bc -o
output.bc`.
But my problem is to execute the .s generated file.
As long as I know, gcc compiler is capable to generate target machine code
from assembly.
So I tried to compile it with gcc to generate machine code, but there was
many problems.
Is there any way to compile and run .s files?
Best regards,
Alysson
On Fri, Jul 2, 2010 at 2:20 AM, Reid Kleckner <reid.kleckner at
gmail.com>wrote:
> How are you getting LLVM to run your pass? There's plenty of
> information here if you haven't found this document:
> http://llvm.org/docs/WritingAnLLVMPass.html
>
> I'm going to assume you're using `opt -load MyPass.so -my-pass
> input.bc -o output.bc` in which case you can just run llc on output.bc
> to get a .s file.
>
> Reid
>
> On Thu, Jul 1, 2010 at 8:16 PM, Alysson <aishofpf at gmail.com>
wrote:
> > Hi all,
> > I´ve been working on a transformation pass which performs the remotion
of
> > some redundant instructions.
> > So now it´s finished I´d like to run the optimized programs generated
by
> my
> > pass.
> > But I´ve got some problems to do this, because I didn´t find a way to
> > generate assembly from the code and then call the gcc compiler to
produce
> > machine-dependent code.
> > Please, does anybody know how to run programs optmized by passes?
> >
> > Thanks you all!
> > Best regards,
> > Alysson
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20100704/15733eec/attachment.html>