[llvm-commits] [llvm] r48672 - in /llvm/branches/ggreif/use-diet: include/llvm/Constants.h include/llvm/InstrTypes.h include/llvm/Instructions.h include/llvm/Support/LLVMBuilder.h include/llvm/User.h lib/VMCore/AutoUpgrade.cpp lib/VMCore/BasicBlock.cpp lib/VMCore/Constants.cpp lib/VMCore/Core.cpp lib/VMCore/Function.cpp lib/VMCore/Instructions.cpp lib/VMCore/Module.cpp

Chris Lattner clattner at apple.com
Fri Mar 21 20:14:50 PDT 2008


On Mar 21, 2008, at 6:13 PM, Gabor Greif wrote:
> Author: ggreif
> Date: Fri Mar 21 20:13:32 2008
> New Revision: 48672
>
> URL: http://llvm.org/viewvc/llvm-project?rev=48672&view=rev
> Log:
> First changes for wave1, placement 'operator new' introduced where  
> appropriate. libLLVMCore.a builds, but there are many new FIXMEs.  
> Help and feedback welcome.

Hrm, I don't think this is the right approach.  I'd suggest moving the  
code from using:

  x = new AllocaInst(...)

for example, to using:

  x = AllocaInst::Create(...)

This allows the static create method to do any custom memory  
allocation that it wants to.  There is client impact, but this is a  
general cleanup and can be done incrementally on mainline.  We're  
moving this direction with clang (which allows region based allocation  
for AST nodes etc) and seems like a clean solution.

-Chris



More information about the llvm-commits mailing list