[LLVMdev] MCJIT and Lazy Function Creators

Óscar Fuentes ofv at wanadoo.es
Sun Nov 25 13:13:52 PST 2012


Out of curiosity, I'm replacing the JIT with MCJIT on my compiler. As
all "external" functions are provided by the language's FFI mechanism,
it does

MyExecutionEngine->DisableSymbolSearching();
MyExecutionEngine->InstallLazyFunctionCreator(&MyLazyFunctionCreator);

which works fine with the JIT. However, MCJIT insists on resolving
unknown symbols by searching them outdoors and seems oblivious of the
existence of MyLazyFunctionCreator.

Is this a bug?

Is there a workaround, other than subclassing JITMemoryManager and
implementing my own getPointerToNamedFunction? (which would make the
existence of ExecutionEngine::InstallLazyFunctionCreator pointless.)




More information about the llvm-dev mailing list