-
Notifications
You must be signed in to change notification settings - Fork 13.3k
-Z dump-mir usage instructions not clear #56558
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
For reference, the rustc guide has additional information on this flag that could either be adapted for the help info or, at least, linked to. |
How about something like:
Too long? |
Seems like nearly all of the existing options are one-line. There's one notable exception:
So I guess there's precedent? |
Indeed. That's where I copied the indentation style from. |
(Should perhaps drop the hyphens and use backticks though) |
That sounds good to me 😃 |
CleanEndRegions should be replaced with a pass that still exists. (See rustc_mir::transform for the passes that's rustc currently has) |
Great. I'll raise a PR for this shortlyish. |
PR for this is now up. |
Improve the usage message for `-Z dump-mir`. Ouput now looks like this: ``` $ rustc -Z help ... -Z arg-align-attributes -- emit align metadata for reference arguments -Z dump-mir=val -- dump MIR state to file. `val` is used to select which passes and functions to dump. For example: `all` matches all passes and functions, `foo` matches all passes for functions whose name contains 'foo', `foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo', `foo | bar` all passes for function names containing 'foo' or 'bar'. -Z dump-mir-dir=val -- the directory the MIR is dumped into ... ``` Fixes rust-lang#56558
Is there any way to dump only the ordinary MIR file (like |
Hi,
I wanted to inspect the MIR of my program and found
-Z dump-mir
via this issue:rust-lang/rustc-dev-guide#11
The usage for this option is:
What can
val
be here? I've managed to figure out that-Z dump-mir=all
works, but what else is valid? I think the usage string should say.Thanks
The text was updated successfully, but these errors were encountered: