[LLVMdev] Re ducing LLVM's memory usage
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat Dec 27 06:28:37 PST 2008
Hi Vitaly,
Vitaly C. wrote:
> Hi,
>
> I am working on a binary translator and use LLVM for this.
> In the process, I generate millions of constants (immediate values in the
> source binary code).
> The problem is that these constants seem to be not cleaned when I delete the
> LLVM code (using Function::deleteBody() ) and as a result the memory usage
> keeps growing. I browsed the forum and found that constants "live forever"
> by design.
>
Right.
> Is there are simple way of cleaning the used memory without destroying
> everything (unloading the ExecutionEngine, freeing the module, calling
> llvm_shutdown) ? Ideally I would like something which brings everything to
> the state just after I created the JIT engine for the first time.
>
>
+1 :) Being on the JIT side also, that would be a great feature. I know
there is a plan to support parallel compilation between LLVM modules,
and this may involve a self-sufficient module (ie constants, types will
be deleted at deletion of the module), but I don't know what's the
status of the project.
Nicolas
More information about the llvm-dev
mailing list