[llvm-commits] [llvm] r54640 - in /llvm/trunk/include/llvm/Support: ConstantFolder.h IRBuilder.h TargetFolder.h

Duncan Sands duncan.sands at math.u-psud.fr
Tue Aug 12 03:20:29 PDT 2008


Hi Chris,

> Because of the name of this file, I expect a lot of people to go here  
> to look for the LLVM IR constant folding interfaces.  Please document  
> that this file is designed for use with IRBuilder and point people to  
> the ConstantExpr::get* methods and libanalysis for simple constant  
> folding uses.

that said, llvm-gcc now also uses TargetFolder when directly creating
constants (eg: global variable initializers), and it's quite convenient
for that.  This is the reason that TargetFolder has a few methods that
aren't needed by IRBuilder.  I put the same extra methods in ConstantFolder,
so you can easily flip between ConstantFolder and TargetFolder in llvm-gcc.

Ciao,

Duncan.



More information about the llvm-commits mailing list