Skip to content
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

Merged
merged 4 commits into from
Mar 13, 2016
Merged

Add Pass manager for MIR #31916

merged 4 commits into from
Mar 13, 2016

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Feb 26, 2016

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

@arielb1
Copy link
Contributor

arielb1 commented Feb 27, 2016

Is there a way to generate MIR graphs after this PR?

@nagisa
Copy link
Member Author

nagisa commented Feb 27, 2016

The graphviz ones? I don’t think so, but an option for unpretty could certainly be added.

@nikomatsakis
Copy link
Contributor

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 --unpretty is the better way to access it. (Also, it ought to imho be -Z unpretty, as that is not on any sort of path to stability, but that's obviously a separate issue.)

@bors
Copy link
Contributor

bors commented Mar 3, 2016

☔ The latest upstream changes (presumably #31979) made this pull request unmergeable. Please resolve the merge conflicts.

@nagisa
Copy link
Member Author

nagisa commented Mar 4, 2016

Rebased, comments addressed.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 8, 2016

📌 Commit e30ff06 has been approved by nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r-

@nikomatsakis
Copy link
Contributor

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.

@arielb1
Copy link
Contributor

arielb1 commented Mar 8, 2016

I like to use graphviz to debug MIR. It is much more readable than the standard debug output.

@arielb1
Copy link
Contributor

arielb1 commented Mar 8, 2016

I think that having a --unpretty mir-graphviz would be a good way to fix that.

@nagisa
Copy link
Member Author

nagisa commented Mar 8, 2016

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.
@nagisa
Copy link
Member Author

nagisa commented Mar 12, 2016

--unpretty mir-cfg added. Bikeshed on name welcome.

EDIT: note that dot does not react well to multigraph dot files with most outputs. e.g. -Tps works fine, -Tpng only outputs the first graph.

@arielb1
Copy link
Contributor

arielb1 commented Mar 13, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Mar 13, 2016

📌 Commit bdc176e has been approved by arielb1

@bors
Copy link
Contributor

bors commented Mar 13, 2016

⌛ Testing commit bdc176e with merge c21644a...

bors added a commit that referenced this pull request Mar 13, 2016
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
@bors bors merged commit bdc176e into rust-lang:master Mar 13, 2016
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 10, 2017
driver: restore partially deleted comment

Fixes rust-lang#39689. Comment was lost in commit 811b874 (rust-lang#31916 @nagisa).
Centril added a commit to Centril/rust that referenced this pull request Jan 15, 2019
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
Centril added a commit to Centril/rust that referenced this pull request Jan 19, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants