[LLVMdev] RFC: Constant Creation API

Owen Anderson resistor at mac.com
Tue Jul 28 10:26:45 PDT 2009

On Jul 28, 2009, at 10:17 AM, Nicolas Geoffray wrote:
> The goal is to remove all constants created during IR creation of a
> function, once the function has been JITted. For example, after the
> function has been JIIted, I can call llvm::Function->deleteBody, that
> will delete the instructions in the function. But all llvm::Constants
> created by the function will remain in memory. If I could attach a
> LLVMContext per function to create the constants, I would be able to
> delete all constants created for the function's body by deleting the
> LLVMContext.
> Does that make sense?

It makes sense, but it sounds like risky business.  Good luck with  
it! ;-)


More information about the llvm-dev mailing list