[LLVMdev] Building bitcode modules

Eric Christopher echristo at apple.com
Thu Sep 29 10:39:14 PDT 2011


On Sep 29, 2011, at 10:35 AM, John Criswell wrote:

> On 9/29/11 11:45 AM, Eric Christopher wrote:
>>> (I'm jumping into the middle of this conversation as it looks like you're discussing something that might be relevant to my work.  Sorry I'm not up to speed on the full context of the discussion...)
>>> 
>>> If you are asking whether anyone is using machinery in LLVM's build system to compile programs into LLVM bitcode files, the answer is yes.  The LLVM Makefile machinery is used not only by LLVM but by LLVM sub-projects like SAFECode, Automatic Pool Allocation, and others.  Practically every project I work on (either research or open-source) is organized as a sub-project of LLVM.
>>> 
>>> We compile our run-time libraries into LLVM bitcode files so that their functions can be inter-procedurally inlined and optimized by LLVM (either by llvm-ld or by libLTO).  This is simple to do as defining a macro in the Makefile turns this feature on (BYTECODE_LIBRARY=1, IIRC).
>>> 
>>> If you remove this feature, I will most likely have to re-implement it in all of our projects' Makefiles.  I may have to update our test suite Makefiles as well.  I'm not sure how time consuming that would be, but I'd rather not have to change all of my projects if I don't have to, even if the change is trivial.
>>> 
>>> If you have already removed this feature, can you please revert the commits and add it back?
>> It wouldn't be too bad. It was part of some larger commits, but I'll rework it a little cleaner and add in just the detection of a compiler that can emit bitcode.
> 
> I'm not exactly sure what you're saying.  Are you saying that you will be maintaining this feature as it was in previous versions of LLVM, or are you saying that you're adding an alternate feature which will require that I adapt our Makefiles to use?

I'll be doing a) - there's no reason for you to need to update your makefiles. The current test-suite has the bits in it, I just moved it down to the test suite because nothing in the actual llvm tree depends on bit code being constructed.

On at least darwin and linux platforms -O4 will do a full interprocedural build. Does that not work for you?

-eric

-eric



More information about the llvm-dev mailing list