-
Notifications
You must be signed in to change notification settings - Fork 30
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
LLVM-6.0 support #72
Comments
Hi, Thanks for your interest! We use Java shims for the LLVM C API that JLang uses to generate the LLVM code. Currently those shims are generated from the LLVM-5.0 API and thus produce code compatible w/ that version of LLVM. No one is, at the moment, working on updating these shims or their use in the JLang compiler. Likely we would have to change some of the compiler code to match new signatures, etc. but I don't think we're using any functionality that is specific to 5.0. As far as I know (without having looked too hard) there's also no nice way to do this generically across LLVM versions and so any efforts on our end to do this would likely target newer versions of LLVM rather than 6.0. If you're interested in working on 6.0 compatibility then I could certainly give pointers as to what steps would need to be taken. Another option is installing LLVM-5.0 on your system ONLY as a dependency for JLang. |
Drew, I mentioned LLVM-6.0 because this is the closest version to version 5.0. Obviously. targeting newer versions of llvm, like 10.0 is really great and helpful. I mentioned 6.0 because I thought perhaps the update steps would be more straightforward and doesn't require heavy modifications and edits. |
Ah I see - yeah I haven't looked too closely at the API changes so I'm not sure how big a difference 6 vs 10 really is. There isn't anyone actively working on JLang updates here (beyond bug fixes) at the moment so I can't promise a timeline or anything, but I'll create a ticket that outlines the work needed and if someone gets around to it we'll certainly let you know. |
Thanks. |
The main tools I've heard of are JITs rather than ahead-of-time and also proprietary -- see Azul's Falcon compiler. Most other efforts I know of go the other way -> allowing LLVM-based native code to run on a language VM (e.g, GraalVM). I believe that's part of the reason that JLang was started originally - a surprising dearth of artifacts in this area! Sorry I couldn't be more helpful. |
@tehranixyz You can use llvm-as of LLVM 5.0 to transform the generated .ll file to llvm-5.0 bitcode which is supported in any version of LLVM after 5.0, the reason is LLVM keeps backward compatibility of bitcode format. |
Hi,
Is there any way to build the JLang project using LLVM-6.0?
I'm using JLang to generate LLVM IR out of java files. And I use the Java LLVM IR files for downstream tasks.
The problem is that I'm using some other tools that are compatible with LLVM-6.0. As a result, almost all of the .ll files generated by JLang are rejected by the other tools. This is because the other tools do not support LLVM-5.0 but JLang only uses LLVM-5.0. JLang raises an error if any other version of LLVM is used:
LLVM version is out of date (or too new)
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: