-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port Pure to the MCJIT in order to support LLVM 3.6+ #6
Comments
It looks like with the ORC API it is possible to compile each function. It would be great if Pure did not depend on an obsolete LLVM. The easier it is to install it, the more people will use it :) |
Pulling the rug out from under people is what I predicted would happen with LLVM, simply because of where it comes from -- that it, for whose main benefit it exists. I hope this all gets sorted out, but maybe it would be better to have a different back end? |
@mardukbp, compiling functions on demand isn't enough, the Pure interpreter needs to recompile functions every time you add a collection of equations to an existing function. So I'm not sure whether the code from the latest version of the Kaleidoscope example will help, but I'll look into it some time. @chemoelectric I've gone through many LLVM versions, and they kept breaking the C++ API with almost every release, so that's nothing new. It's just that I've been procrastinating on this issue forever, because the scope of the changes to move away from the old JIT is quite substantial. Also, I've been busy with other projects. But I'll get to it eventually. ;-) |
FWIW, we plan to remove LLVM 3.5 from FreeBSD in about six months time. The oldest version available that that point will likely be 6.0 or 7.0. |
Maybe the title should be changed to "Port Pure to the ORCv2 JIT in order to support LLVM 3.7+" |
We have to do this some time real soon now, as Linux distributions are beginning to phase out LLVM 3.5. Also, clang 3.5 isn't supported by MacPorts on current macOS systems any more, while LLVM 3.5 still is.
The main problem here are the dynamic features of the Pure language, which allow a global function definition to be refined at any time. Last time I looked, MCJIT didn't allow to recompile individual functions on the fly, only modules. If it is still that way, it will require a substantial rewrite of the compiler backend (basically, every global Pure function will have to go into its own module and these will then have to be linked together; right now the entire Pure program is just a single LLVM module).
(Originally submitted 2015-02-28 by David Slate as BB #36.)
The text was updated successfully, but these errors were encountered: