rust-lang / rust-lang/rustc-dev-guide

Add dump-mir=<val> options

Open
#518 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

-Zdump-mir A-contributor-devex A-MIR A-mir-opt C-enhancement E-medium T-compiler
Dominant language
HTML
Stars
1.9k
Forks
613
Avg merge
17h 24m
Merged PRs (30d)
39

Description

rustc +nightly -Zdump-mir=<val> -Zmir-opt-level=3

-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'.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue supplies a rustc nightly command and examples for selecting MIR passes and functions, but names no documentation file or test. Start by searching the rustc-dev-guide for existing MIR or -Z option documentation; done means adding the dump-mir syntax and selector examples in the appropriate guide section.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.