refactor: upgrade to official inkwell#254
Merged
baszalmstra merged 1 commit intomun-lang:masterfrom Aug 23, 2020
Merged
Conversation
d53ab1b to
21e17c0
Compare
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
- Coverage 78.63% 78.49% -0.15%
==========================================
Files 212 215 +3
Lines 12681 12719 +38
==========================================
+ Hits 9972 9984 +12
- Misses 2709 2735 +26
Continue to review full report at Codecov.
|
This was referenced Aug 23, 2020
92be742 to
45c5182
Compare
Wodann
requested changes
Aug 23, 2020
Collaborator
Wodann
left a comment
There was a problem hiding this comment.
Finally, we'll be able to publish all of our crates. Nice! 🎉
09bb921 to
bd9df1c
Compare
Wodann
approved these changes
Aug 23, 2020
bd9df1c to
97f4ca8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR eliminates the need to maintain a custom version of Inkwell. We used a custom version of Inkwell because our code could not handle a breaking change in their code; the lifetime of the
inkwell::context::Context. Adding this lifetime was hard because we cached a lot of Inkwell related computations in the salsaIrDatabase. However, salsa doesn't work with lifetimes, so we couldn't add the lifetimes. Also, the LLVM context is single threaded which caused our database to not beSyncand we couldn't perform parallel LLVM computations.This PR adds the context lifetime throughout the codebase enabling us to use the latest (and officially) released version of Inkwell. This will also allow us to finally publish the compiler crates.
Besides the inkwell update, the code is also updated to work with LLVM8 (over LLVM7). In the future we should be able to update to LLVM10+, however, due to a [bug in LLD introduced in LLVM 9][https://reviews.llvm.org/D86401) we couldn't invoke the linker multiple times. Once the fix for that bug lands in a release version of LLVM we can upgrade further (inkwell already supports LLVM10).
Related to inkwell issues: TheDan64/inkwell#187
Closes #151