Hi there, I'd like to initiate a discussion regarding the proposal to migrate the JIT engine from LLVM MCJIT to LLVM ORC v2 [1] in Gandiva. I've provided a concise description of the proposal in the following issue: https://github.com/apache/arrow/issues/37848. I welcome any feedback or comments on this topic. Please feel free to share your thoughts either here on the mailing list or directly within the issue. Thank you for your attention and help.
*Background:* Gandiva currently employs MCJIT as its internal JIT engine. However, LLVM has introduced a newer JIT API known as ORC v2/LLJIT [1], which presents several advantages over MCJIT: * Active Maintenance: ORC v2 is under active development and maintenance by LLVM developers. In contrast, MCJIT is not receiving active updates and, based on indications from LLVM developers, is slated for eventual deprecation and removal. * Modularity and Organization: ORC v2 boasts a more organized and modular structure, granting users the flexibility to seamlessly integrate various JIT components. * Thread-Local Variable Support: ORC v2 natively supports thread-local variables, enhancing its functionality. * Enhanced Resource Management: When compared to MCJIT, ORC v2 provides a more granular approach to resource management, optimizing memory usage and code compilation. *Proposal:* I propose the introduction of ORC v2/LLJIT to replace MCJIT in gandiva. There should not be any user facing change, and performance is expected to be roughly the same. Any feedback is appreciated. Thanks. *References:* [1] https://llvm.org/docs/ORCv2.html [2] https://github.com/apache/arrow/issues/37848 Regards, Yue Ni