-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add Pass manager for MIR #31916
Add Pass manager for MIR #31916
Conversation
4137efe
to
e7deed8
Compare
Is there a way to generate MIR graphs after this PR? |
The graphviz ones? I don’t think so, but an option for |
This basically LGTM. I think the dep-graph node handling here is not right, but it might be worth cleaning that up in a later PR. Sort of sad to lose access to the graphviz code altogether, though I agree that |
☔ The latest upstream changes (presumably #31979) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased, comments addressed. |
@bors r+ |
📌 Commit e30ff06 has been approved by |
@bors r- |
Actually, one question: are we ok with having no more way to get graphviz output (until someone lands a PR)? I am, but I'd love to hear from one or two others on @rust-lang/compiler on this point. |
I like to use graphviz to debug MIR. It is much more readable than the standard debug output. |
I think that having a |
I’ll try implementing that this weekend or something if I don’t get carried away with university things. I’m fine with blocking this on that – it is not like this is important to land this sooner than later. |
Also change output for --unpretty mir to output function names in a prettier way.
EDIT: note that dot does not react well to multigraph dot files with most outputs. e.g. |
@bors r+ |
📌 Commit bdc176e has been approved by |
Add Pass manager for MIR A new PR, since rebasing the original one (#31448) properly was a pain. Since then there has been several changes most notable of which: 1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into; 2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass` r? @nikomatsakis
driver: restore partially deleted comment Fixes rust-lang#39689. Comment was lost in commit 811b874 (rust-lang#31916 @nagisa).
Add missing unpretty option help message There are some missing help messages that is printed `ructc -Zunpretty help` and receiving invalid option. related with rust-lang#16419, rust-lang#45721, rust-lang#21085, rust-lang#31916
Add missing unpretty option help message There are some missing help messages that is printed `ructc -Zunpretty help` and receiving invalid option. related with rust-lang#16419, rust-lang#45721, rust-lang#21085, rust-lang#31916
A new PR, since rebasing the original one (#31448) properly was a pain. Since then there has been several changes most notable of which:
#[rustc_mir(graphviz/pretty)]
, mostly because we now have--unpretty=mir
, IMHO that’s the direction we should expand this functionality into;MirMapPass
r? @nikomatsakis