[PATCH] D12607: [ExecutionEngine] Add to the C API possibility to create custom SectionMemoryManager
Jauhien Piatlicki via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 15:00:12 PDT 2015
jauhien added a comment.
thanks for reply.
In http://reviews.llvm.org/D12607#240729, @lhames wrote:
> Hi Jauhien,
> I don't think this is a good fit for the stable C API. To remain stable, we need to minimize the dependency on implementation details. This patch would add a lot of dependence on the behavior of SectionMemoryManager.
This patch relies on these things:
1. Methods needed for memory management (already used in create mcjit)
2. Methods for symbol resolution
3. Existence of section MM and the fact that it implements mentioned methods
> Are there any aspects that can't be satisfied by re-implementing SectionMemoryManager in C? (I know that may seem inconvenient, but it allows the client to remain stable, which is something SectionMemoryManager doesn't guarantee).
> I think the big missing piece at the moment is the symbol lookup support (getSymbolAddress and getSymbolAddressInDylib). If that's what you need I would prefer to add a new variant of LLVMCreateSimpleMCJITMemoryManager that also supports overloading those functions.
Yes, this is the main reason why I needed this patch. But if we will introduce something for fixing this, we will have a dependency on the point 2 in the list above. And the fact of existence of section MM and implementation of all listed methods by it looks quite stable for me (no much of dependency of its behavior really). Or am I wrong somewhere?
More information about the llvm-commits