[LLVMdev] Stupid question about BumpPtrAllocator

Jonathan Brumley jbrumley at gmail.com
Wed Jul 16 10:12:37 PDT 2008


I'll preface by saying I'm new to LLVM -

I noticed there is an efficient BumpPtrAllocator - however, I can't figure
out how I can allocate IR objects using that allocator.  It looks like all
the factory methods use regular new/delete.

I'm sure someone BumpPtrAllocator is there for a good reason, and someone
here has thought of this use case before.  Anyone want to comment?  Is this
a bad idea?  Do the optimization passes generate a ton of garbage that needs
to be cleaned up immediately?

Or would it be reasonably safe to use the BumpPtrAllocator during IR
creation, optimization, and codegen, and just delete all the garbage when
done with codegen?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080716/4d893b32/attachment.html>


More information about the llvm-dev mailing list