[LLVMdev] LLVMBuilder vs LLVMFoldingBuilder

Dominic Hamon dom.hamon at gmail.com
Thu Apr 10 06:29:54 PDT 2008


Duncan Sands wrote:
>> Another option that was discussed in #llvm is to nuke LLVMBuilder and 
>> rename LLVMFoldingBuilder to LLVMBuilder. If this was the case, I'd 
>> argue for a flag in the Builder that could retain the old non-folding 
>> functionality for debugging purposes.
>>     
>
> this plan sounds good to me.  However it's not clear to me how useful a
> debug flag would really be.
>
>   
After further discussion in #llvm, and lots of compiling and 
re-compiling, please find attached the first attempt at the patch with 
this change. There are two patches attached, one for llvm and one for 
llvm-gcc42.

Please note, there's quite a substantial API change in this patch: 
LLVMBuilder has been renamed to IRBuilder and has absorbed the 
constant-folding functionality from LLVMFoldingBuilder.

I've updated the tutorial html to refer to the correct includes and 
classes and tweaked Chapter 4 in particular to explain the constant 
folding optimizations rather than to explain how to use the 
LLVMFoldingBuilder to improve the code generation and these changes are 
included in the patch.

This is my first patch so please let me know if there are any problems 
or anything I need to do differently.

Thanks


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm-gcc42.IRBuilder.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080410/8c36b1a1/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm.IRBuilder.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080410/8c36b1a1/attachment-0001.ksh>


More information about the llvm-dev mailing list