-
Notifications
You must be signed in to change notification settings - Fork 738
Closed
Labels
enhancementCheck if this issue/PR enhances a feature; scripts will use this info.Check if this issue/PR enhances a feature; scripts will use this info.
Description
WAMR was used to implement an eager compilation with MCJIT and a lazy compilation with ORCJIT. It leads to a unfriendly maintain case. ORCv2 gives us a good opportunity to improve that.
Here are modifications:
- Use
LLJITto implement an eager compilation. It will perform on symbolLLVMOrcLLJITLookup.LLJITcompiles all functions in the targetLLVMModuleRef. - Use
LLLazyJITto implement a lazy compilation. There is aCompileOnDemandLayerallowingLLLazyJITcompiling a function only when actually calling it. - Lazy call through provides a function stubs for every function.
LLVMOrcLLLazyJITLookupwill return the stub. It means once aot_loader fills thefunc_ptrswith results ofLLVMORCXXXJITLookup, there is no necessary to assume meeting a NULL function pointer when dealing withcallandcall_indirect. - Since
lib/ExecutionEngine/Orc/OrcV2CBindings.cpponly includingLLJITstaff, need to create binds forLLLazyJIT.
Metadata
Metadata
Assignees
Labels
enhancementCheck if this issue/PR enhances a feature; scripts will use this info.Check if this issue/PR enhances a feature; scripts will use this info.