converting large projects to LLVM

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

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,

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