Hi, I wrote an interprocedural instrumentation pass that needs to run on all program at once. However, when I try to test it on large programs (say bzip2 or gcc) I find that the way LLVM tools do not easilly replace the default ones used in makefiles. So building large projects is not straightforward. Is there a simple way to do this conversion? Thank you, Dan _________________________________________________________________ Windows 7: It helps you do more. Explore Windows 7. http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091028/72d117a2/attachment.html>
2009/10/28 dan mihai <dnmh68 at hotmail.com>:> Hi, > > I wrote an interprocedural instrumentation pass that needs to run on all > program at once. > However, when I try to test it on large programs (say bzip2 or gcc) I find > that the way LLVM > tools do not easilly replace the default ones used in makefiles. So building > large projects is > not straightforward. Is there a simple way to do this conversion?Do you want a .bc of all the sources combined? There was some discussion on updating the gold plugin to do it: http://www.nabble.com/Re%3A-strace-for-whole-program-bitcodes-p25919413.html> Thank you, > Dan >Cheers, -- Rafael Ávila de Espíndola
dan mihai wrote:> Hi, > > I wrote an interprocedural instrumentation pass that needs to run on all > program at once. > However, when I try to test it on large programs (say bzip2 or gcc) I > find that the way LLVM > tools do not easilly replace the default ones used in makefiles. So > building large projects is > not straightforward. Is there a simple way to do this conversion?No. The first step is to replace gcc with "llvm-gcc -flto", but the last stage of a build is usually a link against other libraries which you don't want to do. You can't link bitcode with native code and produce bitcode, but you do want to link the bitcode together. Modify the Makefile to remove the existing linking step and write a new one that calls llvm-link or "llvm-ld -link-as-library" over the .o files. Nick