-
Notifications
You must be signed in to change notification settings - Fork 78
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
Upcoming release of the llir/llvm project #29
Comments
Hi! This is a fantastic project and I've really enjoyed using it. Please could you consider using semantic version numbers for release tags? Just something of the form If you're not aware, Some references:
Looking forward to the next release of |
Happy to hear you enjoy the project! We too have had a lot of fun playing with various aspects of LLVM IR from Go.
Definitely. we'll make sure to tag the upcoming release with
The upcoming release can be expected to arrive in a couple of months. Right now, I'm out enjoying vacation :) Have a wonderful summer! Cheers, |
Boom. Have a great holiday. Ciao! :) |
Haha, speedy reply. Thanks! You too! |
By the way, if you're making a big backwards incompatible change, you should bump the major version number. I can elaborate further on why if it's not obvious, or I can recommend Russ Cox's writings on the matter: https://research.swtch.com/vgo-import The upshot is that you can do big breaking changes without breaking existing users (even those just using old-style Go get). |
This will definitely be the case after the v1.0.0 release. Breaking changes will cause major version bumps. While on version 0.x however, API breakage is expected and even encouraged so that the API of 1.0 will be clean and consistent. If I recall correctly, this is allowed by semantic versioning? Edit: to expand on the above, the readme has had a work in progress notice, which will be removed as soon as we hit version 1.0.
|
It would be good to try and reach a stable API. A stable public API doesn't mean you can't add to it though. You do already have quite a bit of useful functionality in there already! :) (Also, feel free to hide all of these comments). |
Just as a notice, version v0.2.1 has been tagged. This version should work with Go modules. As the upcoming release will introduce API changes (and provide full support for the entire LLVM IR language), users are expected to pin the the version of |
A quick status update. @pwaller and I have been running a few experiments to improve the performance of the parser. These experiments have been using a different parser generator (Textmapper instead of Gocc), and the initial results look promising. The approach taken in the https://github.com/mewmew/l-tm seem to pass the desirable speed requirements of mewspring/mewmew-l#6. There is still quite a lot of work to do to finish all instructions, etc. But already from the current work we can estimate to arrive at somewhere between 1x and 2x runtime as compared to the official LLVM distribution for parsing LLVM IR assembly. Compared to the 30x we had before switching from Gocc to Textmapper to generate the LLVM IR parsers, this seems noteworthy enough to start integrating back into the main llir/llvm repo. This will be done in steps.
Edit: the generated parser will be split into a dedicated repository ( |
@mewmew thanks for your efforts on this! Any objection if I make a |
None at all :) The primary aim is now to stress test the implementation, find and fix bugs, start to profile and further improve the performance, and also to find inconsistencies in the implementation and the API, that we can improve before the v0.3.0 release. Do your best to break it! :) |
We are getting closer to release :)
Anyone using the Cheers! |
Haha, it was conspicuously cleaver to leave out the year in above statement. It does look like we will have an early/mid December release of v0.3 after all! |
v0.3.0 of Thanks to everyone who helped get this release in shape by reporting bugs, implementing features, improving test coverage, discussing design ideas and just being friendly and kind. Closing this meta issue and welcoming the adventures of the new year :) 🎆 |
🎉 |
This notice is intended to give a heads up for those using the
llir/llvm
library. The next release will include complete support for all intrinsics of the LLVM IR language. The work is currently in a flux, and to experiment with different API designs and simplify the parser logic and reduce the code duplication in the project, a new repo has been created during the experimental phase.https://github.com/mewmew/l
At the current stage, the grammar is capable of parsing the entirety of the LLVM IR language, including specialized metadata nodes (#26).
While working on this we will also try to take into consideration previous issues that have been identified with the parser (such as the handling of quoted strings #24).
The
llir/llvm/ir
package will be extended to support the entire LLVM IR language; thus resolving #23 as linkage information will be present in the in-memory intermediate representation form.With the upcoming release, read support for all of the LLVM IR language concepts will have been implemented; thus resolving #15.
Similarly; we will now have a grammar covering the entire LLVM IR language; thus resolving #2.
With the addition of support for specialized metadata nodes, the second requirement of
llgo
will also be fully supported (#3); llgo uses the DIBuilder API for generating debug metadata (DWARF, et al.). This could be built outside of the core (it's just a matter of creating metadata nodes in a particular format), just be aware that it's pretty finicky and easy to break..For IR construction, a similar approach will be used as has been done before. Personally, we feel this approach has worked out well and has been quite pleasant to use. If anyone has input on their own experience using the API of the
llir/llvm/ir
package to construct LLVM IR, please let us know as that could help shape the upcoming release. As forllgo
, the first requirement in terms of using the LLVM API for generating code, it's mostly write-only via the builder API. Bitcode and IR reading is not important (at the moment?), but writing is; one or the other is required, but preferably both. is satisfied by this API, and has been for a while. Although, now thellir/llvm/ir
package will contain the support for the entire LLVM IR language, and now just a subset; thus the requirement should be satisfied in full.Module top-level information such as target triple and data layout has been and will continue to be recorded and maintained by the IR API, thus supporting the third requirement of
llgo
; llgo needs to be able to look up target data (arch word size, alignment, etc.) from triples.Generating C-shared library bindings compatible with the official C library of the LLVM project is an ambitious goal that is left for a future release (#12). Anyone specifically interested in this topic, feel free to get in touch with us or continue the discussion in the dedicated issue.
Similarly, interaction with the Go runtime is targeted for a future release, and those with knowledge in this domain are happily invited to the discussion on what is needed and how to bring this about (#18).
As for use-tracking and data analysis support (#19), more thought will be required to get a clean API. This is therefore targeted for a future release.
So, to summarize, the upcoming release of the
llir/llvm
project will include read and write support for the entire LLVM IR language. In other words, it will be possible to parse arbitrary LLVM IR assembly files into an in-memory representation, aka the one defined in packagellir/llvm/ir
. And the in-memory IR representation will have support for the entire LLVM IR language, and can be converted back to LLVM IR assembly for interaction with other tools, such as the LLVM optimizer.Any feedback is welcome, so we know we're heading in the right direction.
Cheerful regards,
/u & i
The text was updated successfully, but these errors were encountered: