-
-
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
Incremental codegen refactor to support llvm/inkwell upgrade #201
Incremental codegen refactor to support llvm/inkwell upgrade #201
Conversation
Codecov Report
@@ Coverage Diff @@
## master #201 +/- ##
==========================================
- Coverage 82.95% 82.63% -0.33%
==========================================
Files 163 162 -1
Lines 11514 11503 -11
==========================================
- Hits 9551 9505 -46
- Misses 1963 1998 +35
Continue to review full report at Codecov.
|
064ce8f
to
7419695
Compare
Hey @joshuawarner32 ! After some further investigation, we spotted some issues with our current design in Mun regarding storing the inkwell Context in a salsa Database. To do parallelism we would need to create a I just wanted to let you know that we're currently taking that route. I was looking at your PR to see if we could salvage some of what you already made, but your PR is way behind the current I'll be working on getting this up and running in the next couple of days, if you would still like to help out, that'd be more than welcome! |
Oh interesting!
My immediate reaction is that this could make the lifetimes very tricky, since all the different contexts would technically have different lifetimes. But maybe this is ok, depending on at what level you do the multithreading at. You probably can't have objects tied to one thread be accessed on another. (??) |
This is a WIP refactor of the codegen, with the end goal of allowing upgrading llvm to 10 and inkwell to the upstream version (#151). Critically in the upstream version of inkwell many of the types grow a <'ctx> type parameter (For the lifetime of the inkwell::context::Context object), which is not compatible with how we are using Salsa in mun_codegen.
To that end, this is a refactoring that removes the use of Salsa from the mun_codegen. IrDatabaseStorage is replaced with four separate items:
This massively increases the length of many method signatures, which I'm not a huge fan of - but I suspect some of these will need careful lifetime annotations, which might be harder to get right if we bundle everything together prematurely. For sure context will need to be passed around separately.
(Note, the first two commits here are 100% temporary; I need to rebase these away before this is merged)