<div><div>Oh, Mian, sorry for my fool reply...</div><div><br></div><div>I was thinking that you do it in high-level...</div><div><br></div><div>Your idea is cool, 'cause allow integrate an inline methods generated from diferent languages, right?</div>

</div><div><br></div><div>Thanks</div><br><br><div class="gmail_quote">2011/9/2 Mian M. Hamayun <span dir="ltr"><<a href="mailto:mian-muhammad.hamayun@imag.fr">mian-muhammad.hamayun@imag.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Thanks Eric, Jim and Geovani for your responses.<br>
<br>
Yes, we can combine two or more bitcode modules using llvm-ld and in this way functions can be inlined and optimized during this process.<br>
<br>
But I am also looking into the possibility of doing the same using LLVM Pass Manager (Without using llvm-ld). This looks difficult due to the fact that the function definitions ought to be in the same module as the caller, in order to be inlined and then optimized onwards, I guess !!! (Correct me If I am Wrong at this)<br>


<br>
Thanks Again,<br><font color="#888888">
Hamayun<br>
</font><br>
P.S. @Geovani: "You have tried do it in semantical phase?"<br>
Which LLVM Passes are you referring here ? Because I am working at the LLVM-IR Level, where I generate LLVM-IR modules, optimize them and then compile them for a given target.<div><div></div><div class="h5"><br>
<br>
<br>
On 09/01/2011 06:41 PM, Jim Grosbach wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To do it manually, llvm-ld your modules to get a single module with both, then run opt on the result to optimize it. From source code, you can just use -O4 to the compiler on a system with a suitable linker (standard ld on OSX; binutils+gold plugin on Linux, for example).<br>


<br>
-Jim<br>
<br>
On Sep 1, 2011, at 9:27 AM, Mian M. Hamayun wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Everyone,<br>
<br>
Hopefully this question is not too absurd.<br>
<br>
Actually I created an example in LLVM, where I generate two modules, one containing the function definition and the other module calling this function.<br>
(Question related to this was posted on this mailing list recently)<br>
<br>
Now I want to know, whether it is possible to "inline" the definition of this function in the caller module, using some optimization pass etc?<br>
<br>
I have previously experimented with LLVM's JIT Framework, and we can do something similar over there. But now I am interested in doing this without JIT Framework.<br>
<br>
Any ideas/suggestions/comments on how could we accomplish this?<br>
<br>
Thanks in advance,<br>
Mian M. Hamayun<br>
Grenoble, France.<br>
<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote>
<br>
</blockquote>
<br>
<br>
</div></div><br>_______________________________________________<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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>@geovanisouza92 - Geovani de Souza</div><br>