<div dir="ltr">Good tips. Although I have used llvm-link to merge .bc files together, I guess -flto could optimize the resultant .bc file further.<div><br></div><div>As for the assembly, yes it is an issue. Anyway, I'll try to address those sources which are available for being translated into .bc first.</div><div><br></div><div>Thanks for your advice, Tim.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 2:55 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> If there's any automated way to infer about all the subroutines that one<br>
> function needs, clang them into .bc file and link them into a stand-alone<br>
> .bc library, that will be more than appreciated:-)<br>
<br>
</span>If manually compiling the files is working for you, you could try<br>
building the entire library with "-flto" for Link-time optimisation.<br>
The output of that will be LLVM IR (if you can convince the build<br>
system to do it for you).<br>
<br>
The issue is that parts of the standard library are<br>
performance-critical and often written in assembly. If the entire file<br>
is assembly you won't be able to produce IR very easily at all.<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards<br>Liwei<br>
</div>