Skip to content
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

Open
agraef opened this issue Mar 27, 2017 · 5 comments
Open

Port Pure to the MCJIT in order to support LLVM 3.6+ #6

agraef opened this issue Mar 27, 2017 · 5 comments
Assignees
Milestone

Comments

@agraef
Copy link
Owner

agraef commented Mar 27, 2017

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.)

@agraef agraef self-assigned this Mar 27, 2017
@agraef agraef added this to the 1.0 milestone Mar 27, 2017
@mardukbp
Copy link

mardukbp commented Jul 23, 2018

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 :)

@chemoelectric
Copy link

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?

@agraef
Copy link
Owner Author

agraef commented Oct 5, 2018

@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. ;-)

@brooksdavis
Copy link

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.

@rurban
Copy link

rurban commented Sep 20, 2022

Maybe the title should be changed to "Port Pure to the ORCv2 JIT in order to support LLVM 3.7+"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants