http://llvm.org/bugs/show_bug.cgi?id=22717
Bug ID: 22717
Summary: Decouple memory management and external symbol
resolution.
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: OrcJIT
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The RTDyldMemoryManager couples memory allocation and symbol resolution in a
way that I don't think is helpful. Having them coupled hasn't been a blocker so
far, but the LookasideMemoryManager definitely feels like it's working around
something.
Adding a module to an Orc layer should really look like:
addModuleSet(Modules, Lookup, MemoryManagment);
With the MemoryManager being an optional argument (with a sensible default).
We can basically do this now if we thread the lookup argument (I'd make it a
template argument) through the addModuleSet methods down to the
ObjectLinkingLayer. The ObjectLinkingLayer should then construct a
LookasideMemoryManager with the lookup functor that the user has passed in.
Basically take what the user is forced to do now, and do it for them, way down
in the stack where they don't have to look at or think about it.
This approach would avoid affecting any MCJIT clients for now. In the longer
term we could plumb the lookup argument right down into RuntimeDyld to get some
symbol-resolution performance improvements.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs