[PATCH] [ExecutionEngine][MCJIT] Add a freeGeneratedCode hook.

Sanjoy Das sanjoy at playingwithpointers.com
Wed Jun 10 20:09:07 PDT 2015


Hi lhames,

Add ExecutionEngine::freeGeneratedCode and implement for MCJIT.
freeGeneratedCode lets an ExecutionEngine client drop all generated code
and related state.  This hook can be used to:

  1. Free code no longer in use.  This is useful for MCJIT clients that
     relocate code generated by MCJIT into space allocated by the rest
     of the runtime, and don't need the code buffers managed by MCJIT
     once this is done.

  2. Reset MCJIT from a state after generateCodeForModule has been
     called but relocations haven't been applied to a good state ready
     for a new compilation.  This is useful for error recovery.

http://reviews.llvm.org/D10378

Files:
  include/llvm/ExecutionEngine/ExecutionEngine.h
  include/llvm/ExecutionEngine/RuntimeDyld.h
  include/llvm/ExecutionEngine/SectionMemoryManager.h
  lib/ExecutionEngine/MCJIT/MCJIT.cpp
  lib/ExecutionEngine/MCJIT/MCJIT.h
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
  lib/ExecutionEngine/SectionMemoryManager.cpp
  unittests/ExecutionEngine/MCJIT/CMakeLists.txt
  unittests/ExecutionEngine/MCJIT/MCJITObjectCleanupTest.cpp
  unittests/ExecutionEngine/MCJIT/MCJITTestBase.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10378.27484.patch
Type: text/x-patch
Size: 14798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150611/734eb7de/attachment.bin>


More information about the llvm-commits mailing list