[llvm-commits] [PATCH] Move the Function*->allocated blocks map from the JITMemoryManager to the JITEmitter

jyasskin at gmail.com jyasskin at gmail.com
Tue Oct 20 00:11:09 PDT 2009


Reviewers: natebegeman_mac.com,

Message:
Please take a look.

Description:
I'm making Functions auto-remove themselves from the JIT when they're
destroyed. In this case, the Function needs to be removed from the
JITEmitter, but the map recording which Functions need to be removed
lived behind the JITMemoryManager interface, which made things
difficult.

This patch replaces the deallocateMemForFunction(Function*) method with
a pair of methods deallocateFunctionBody(void *) and
deallocateExceptionTable(void *) corresponding to the two
startFoo/endFoo pairs.

Patch at http://codereview.appspot.com/download/issue135055_1.diff. This
slightly depends on http://codereview.appspot.com/132055 for ValueMap<>,
but I can remove that if this gets approved first.

Please review this at http://codereview.appspot.com/135055

Affected files:
   M include/llvm/ExecutionEngine/JITMemoryManager.h
   M lib/ExecutionEngine/JIT/JITEmitter.cpp
   M lib/ExecutionEngine/JIT/JITMemoryManager.cpp
   M unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp





More information about the llvm-commits mailing list