[LLVMdev] Out-of-tree passes (Was: LLVM Weekly - #43, Oct 27th 2014)
David.Chisnall at cl.cam.ac.uk
Mon Oct 27 02:59:13 PDT 2014
On 27 Oct 2014, at 09:33, Alex Bradbury <asb at asbradbury.org> wrote:
> The Haskell community have put together a [proposal for an improved LLVM
> backend to GHC](https://ghc.haskell.org/trac/ghc/wiki/ImprovedLLVMBackend).
> They intend to ship GHC with its own local LLVM build.
This post brings up an interesting point:
> However, the framework is modular - we can extend LLVM with plugins. For example, several years ago, Max Bolingbroke wrote a plugin for LLVM's alias analysis that improved the generated code in some cases by 12%, just by teaching it GHC-specific code generation needs.
> However, due to lack of API guarantees mentioned above, it becomes difficult to support such analysis for arbitrary end users, and we cannot fix or tune analysis results to specific versions of LLVM or GHC.
This is a problem for anyone with an out-of-tree LLVM front end, or library, that would benefit from some custom optimisations. Without even a nod towards API (let alone ABI) stability for the core IR classes, it's very hard for people to gain the full benefit of using LLVM, unless their code is part of the LLVM tree and follows the same release cycle as LLVM (which doesn't scale).
More information about the llvm-dev