-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Topic]: MIR Analyses #10
Comments
This is an amazing write up. It also appears to be beyond the scope of our code reading club sessions. We will be focusing on understanding the modules or crates that makeup the compiler and maybe even resolving a real bug. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Contact Details
felix91gr@gmail.com
Which rustc topic would you like to suggest?
MIR Analysis (and in particular, Dataflow based analysis) is a very important topic to me, but I had a hard time getting around the code itself and the little bits and pieces when I tried making NL(CP) happen. Now I've put this project on hiatus (as of about 3 weeks ago, I've cancelled my thesis which was based on that work c': ), and because of uni I'm not gonna get back at it full steam until I'm able to graduate.
I would like to understand... okay, so this is the current picture I have in my mind of how the compiler processes code:
Text ==> Rust ==> HIR ==> <<MIR>> || Frontend-Backend boundary || ==> <<LLVM>> ==> Binary
Where
<<bloop>>
means thebloop
stage loops back into itself many timesAnd inside of that...
Rust ==> HIR
simplifies rust code (and does macro expansion?)<<MIR>>
makes high-level analyses and transforms such as... non-lexical lifetime analysis, (trait resolution?) and high-level optimizations.The thing is, I would love to understand how we perform everything inside
<<MIR>>
. It's a very important topic for me. Both because it helps Clippy, which can help attest for program correctness... and because it helps reduce compile times and it will one day help us optimize beyond what LLVM alone can give us.And, maybe this is just me or maybe I'm just code-shy, but I feel like my theoretical understanding of some of the program analysis topics is good enough for where the compiler's at. Yet it's still super hard for me to step at a point in
rustc
's MIR Analysis code and know what's up, let alone draft new code to add to it. That's what I would like to learn the most: how to be confident enough with the compiler's code so that I could give back to it from my harvests.Relevant code file URL
And:
(These two links are more about my issues with the docs. Don't take the current docs at face value, because currently they're not quite correct. Just in case you might feel that something's weird about them: it might not be you, but the explanations that are off)
Code of Conduct
The text was updated successfully, but these errors were encountered: