[llvm-commits] [PATCH] Free machine code when its Function is destroyed

Jeffrey Yasskin jyasskin at google.com
Fri Oct 23 17:27:38 PDT 2009


Evan, could you take a look? Or let me know if I should just be
committing these and letting you review them afterwards.

Slightly updated patch at
http://codereview.appspot.com/download/issue140041_2002.diff.

On Thu, Oct 22, 2009 at 4:29 PM,  <jyasskin at gmail.com> wrote:
> Reviewers: ,
>
> Message:
> Please take a look.
>
> Description:
> Patch at http://codereview.appspot.com/download/issue140041_1.diff
>
> Automatically do the equivalent of freeMachineCodeForFunction(F) when F
> is being destroyed. This allows users to run global optimizations like
> globaldce even after some functions have been jitted.
>
> This patch also removes the Function* parameter to
> JITEventListener::NotifyFreeingMachineCode() since it can cause that to
> be called when the Function is partially destroyed. This change will be
> even more helpful later when I think we'll want to allow machine code to
> actually outlive its Function.
>
> This patch depends slightly on the test in
> http://codereview.appspot.com/133043, but I can make them independent if
> this gets reviewed first.
>
> Please review this at http://codereview.appspot.com/140041
>
> Affected files:
>   M include/llvm/ExecutionEngine/ExecutionEngine.h
>   M include/llvm/ExecutionEngine/JITEventListener.h
>   M lib/ExecutionEngine/JIT/JIT.cpp
>   M lib/ExecutionEngine/JIT/JIT.h
>   M lib/ExecutionEngine/JIT/JITEmitter.cpp
>   M lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
>   M unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
>   M unittests/ExecutionEngine/JIT/JITTest.cpp
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list