Hi Antoine, > does it raise the minimum supported LLVM version According to LLVM's documentation [1] [2], the LLJIT API (for ORC v2 JIT) was added in LLVM 8.0, so the minimum version required will be LLVM 8.0 I believe. And I see currently we support LLVM 7.0 ~ 17.0 in arrow [3], so we may have to at least raise the minimum version to LLVM 8.0 (released on Mar 20, 2019 [4]) if this proposal is accepted.
But the migrated implementation will use multiple LLJIT APIs, and I am not sure if all of them were available since 8.0. Currently I only verified against LLVM 14.0.6 locally, and the full compatibility status will require some more testing to figure out. Thanks. Regards Yue Ni [1] https://llvm.org/docs/ORCv2.html [2] https://releases.llvm.org/8.0.0/docs/ReleaseNotes.html#changes-to-the-jit-apis [3] https://github.com/apache/arrow/blob/92723f34f8df40b35e5840e61011c00766808014/cpp/CMakeLists.txt#L154-L166 [4] https://releases.llvm.org On Wed, Dec 6, 2023 at 5:58 PM Antoine Pitrou <anto...@python.org> wrote: > > Given that MCJIT is deprecated and there doesn't seem to be a downside > to the new APIs, migrating to ORC v2 sounds fine to me. > > Just a question: does it raise the minimum supported LLVM version? > > Regards > > Antoine. > > > Le 05/12/2023 à 03:35, Yue Ni a écrit : > > 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 > > >