niyue commented on PR #37867: URL: https://github.com/apache/arrow/pull/37867#issuecomment-1736542115
For the `FinalizeModule` method, I added back the old implementation using the legacy pass manager for LLVM version < 14 for compatibility. For the `RemoveUnusedFunctions` method, I verified the APIs used and they all seem introduced long time ago, and there should not be compatibility issue, but I don't actually verify against LLVM 7.0, but only check github history for verification. Here are the major APIs used in `RemoveUnusedFunctions` method: ### PassBuilder.registerModuleAnalyses Feb 1, 2015, LLVM 3.6.0 https://github.com/llvm/llvm-project/blame/3bb89b6bfbb549a4b129698b0e56d758a1dcd8df/llvm/include/llvm/Passes/PassBuilder.h#L103 ### ModulePassManager May 13, 2017, LLVM 5.0 https://github.com/llvm/llvm-project/blame/3bb89b6bfbb549a4b129698b0e56d758a1dcd8df/llvm/include/llvm/IR/PassManager.h#L25 ### InternalizePass Apr 27, 2016, LLVM 3.9.0 https://github.com/llvm/llvm-project/blame/3bb89b6bfbb549a4b129698b0e56d758a1dcd8df/llvm/include/llvm/Transforms/IPO/Internalize.h#L34 ### GlobalDCEPass May 4, 2016, LLVM 3.9.0 https://github.com/llvm/llvm-project/blame/3bb89b6bfbb549a4b129698b0e56d758a1dcd8df/llvm/include/llvm/Transforms/IPO/GlobalDCE.h#L36 I didn't change the CMake LLVM components yet, since if we use legacy LLVM PassManager API for old versions of LLVM, we probably don't need to change it any more. I will keep an eye on the CI results to see if it works for LLVM 17 environments. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
