Hello,
- Is there any MIR specification out there? No!
- Is it possible to get a MIR textual output out of
rustc
?
Why?
I have seen around more than once how desirable it is to have a GCC backend for rustc
and I agree.
As a GCC contributor I am happy to have a start at it, however my rust-fu is at a minimum. With this I would hope to get to learn more about rust and help the community.
I have twice in the past shown interest in helping but got no feedback so my intention here is to be pro-active. I think, given the current compiler design as I understand it, that we need to pick up rust at MIR and convert MIR into GCC internal representation. This seems to be the feasible way to do it. However, I really need to understand first in detail what is MIR and get a feel for it.
So, let me rephrase my initial questions:
- where are the MIR structures inside rustc and where does the conversion to LLVM IR happen?
- is MIR changing on a regular basis?
- is it possible to get rustc (if not done yet) to output MIR in textual form and read it back again?
Any thoughts on this, suggestions, offers to mentor on the rust side would be very helpful.