Thank you for the answer Reid.<br>I've been already using the format `opt -load MyPass.so -my-pass input.bc -o output.bc`.<br>But my problem is to execute the .s generated file.<br>As long as I know, gcc compiler is capable to generate target machine code from assembly.<br>

So I tried to compile it with gcc to generate machine code, but there was many problems.<br>Is there any way to compile and run .s files?<br><br>Best regards,<br>Alysson<br><br><div class="gmail_quote">On Fri, Jul 2, 2010 at 2:20 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:reid.kleckner@gmail.com">reid.kleckner@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">How are you getting LLVM to run your pass?  There's plenty of<br>
information here if you haven't found this document:<br>
<a href="http://llvm.org/docs/WritingAnLLVMPass.html" target="_blank">http://llvm.org/docs/WritingAnLLVMPass.html</a><br>
<br>
I'm going to assume you're using `opt -load MyPass.so -my-pass<br>
input.bc -o output.bc` in which case you can just run llc on output.bc<br>
to get a .s file.<br>
<font color="#888888"><br>
Reid<br>
</font><div><div></div><div class="h5"><br>
On Thu, Jul 1, 2010 at 8:16 PM, Alysson <<a href="mailto:aishofpf@gmail.com">aishofpf@gmail.com</a>> wrote:<br>
> Hi all,<br>
> Iīve been working on a transformation pass which performs the remotion of<br>
> some redundant instructions.<br>
> So now itīs finished Iīd like to run the optimized programs generated by my<br>
> pass.<br>
> But Iīve got  some problems to do this, because I didnīt find a way to<br>
> generate assembly from the code and then call the gcc compiler to produce<br>
> machine-dependent code.<br>
> Please, does anybody know how to run programs optmized by passes?<br>
><br>
> Thanks you all!<br>
> Best regards,<br>
> Alysson<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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>
</div></div></blockquote></div><br>