Commit 2819eca
authored
Auto merge of #36296 - nagisa:pass-timing, r=eddyb
Count and report time taken by MIR passes
There’s some desire for deeper introspectability into what MIR passes cost us.
-Z time-passes after this PR:
```
Compiling test_shim v0.1.0 (file:///home/nagisa/Documents/rust/rust/src/rustc/test_shim)
time: 0.000; rss: 29MB parsing
time: 0.000; rss: 29MB configuration
time: 0.000; rss: 29MB recursion limit
time: 0.000; rss: 29MB crate injection
time: 0.000; rss: 29MB plugin loading
time: 0.000; rss: 29MB plugin registration
time: 0.032; rss: 54MB expansion
time: 0.000; rss: 54MB maybe building test harness
time: 0.000; rss: 54MB assigning node ids
time: 0.000; rss: 54MB checking for inline asm in case the target doesn't support it
time: 0.000; rss: 54MB complete gated feature checking
time: 0.000; rss: 54MB collecting defs
time: 0.004; rss: 54MB external crate/lib resolution
time: 0.000; rss: 54MB early lint checks
time: 0.000; rss: 54MB AST validation
time: 0.001; rss: 54MB name resolution
time: 0.000; rss: 54MB lowering ast -> hir
time: 0.000; rss: 56MB indexing hir
time: 0.000; rss: 56MB attribute checking
time: 0.000; rss: 56MB language item collection
time: 0.000; rss: 56MB lifetime resolution
time: 0.000; rss: 56MB looking for entry point
time: 0.000; rss: 56MB looking for plugin registrar
time: 0.000; rss: 56MB region resolution
time: 0.000; rss: 56MB loop checking
time: 0.000; rss: 56MB static item recursion checking
time: 0.000; rss: 56MB compute_incremental_hashes_map
time: 0.000; rss: 56MB load_dep_graph
time: 0.000; rss: 56MB type collecting
time: 0.000; rss: 56MB variance inference
time: 0.011; rss: 59MB coherence checking
time: 0.000; rss: 59MB wf checking
time: 0.000; rss: 59MB item-types checking
time: 0.000; rss: 59MB item-bodies checking
time: 0.000; rss: 59MB drop-impl checking
time: 0.000; rss: 59MB const checking
time: 0.000; rss: 59MB privacy checking
time: 0.000; rss: 59MB stability index
time: 0.000; rss: 59MB intrinsic checking
time: 0.000; rss: 59MB effect checking
time: 0.000; rss: 59MB match checking
time: 0.000; rss: 59MB liveness checking
time: 0.000; rss: 59MB rvalue checking
time: 0.000; rss: 59MB MIR dump
time: 0.000; rss: 59MB SimplifyCfg
time: 0.000; rss: 59MB QualifyAndPromoteConstants
time: 0.000; rss: 59MB TypeckMir
time: 0.000; rss: 59MB SimplifyBranches
time: 0.000; rss: 59MB SimplifyCfg
time: 0.000; rss: 59MB MIR passes
time: 0.000; rss: 59MB borrow checking
time: 0.000; rss: 59MB reachability checking
time: 0.000; rss: 59MB death checking
time: 0.000; rss: 59MB stability checking
time: 0.000; rss: 59MB unused lib feature checking
time: 0.000; rss: 59MB lint checking
time: 0.000; rss: 59MB resolving dependency formats
time: 0.000; rss: 59MB NoLandingPads
time: 0.000; rss: 59MB SimplifyCfg
time: 0.000; rss: 59MB EraseRegions
time: 0.000; rss: 59MB AddCallGuards
time: 0.000; rss: 59MB ElaborateDrops
time: 0.000; rss: 59MB NoLandingPads
time: 0.000; rss: 59MB SimplifyCfg
time: 0.000; rss: 59MB Deaggregator
time: 0.000; rss: 59MB AddCallGuards
time: 0.000; rss: 59MB PreTrans
time: 0.000; rss: 59MB Prepare MIR codegen passes
time: 0.000; rss: 59MB write metadata
time: 0.000; rss: 61MB translation item collection
time: 0.000; rss: 61MB codegen unit partitioning
time: 0.000; rss: 61MB internalize symbols
time: 0.007; rss: 61MB translation
time: 0.000; rss: 61MB assert dep graph
time: 0.000; rss: 61MB serialize dep graph
time: 0.000; rss: 61MB llvm function passes [2]
time: 0.000; rss: 61MB llvm function passes [3]
time: 0.000; rss: 61MB llvm function passes [1]
time: 0.000; rss: 61MB llvm function passes [0]
time: 0.000; rss: 61MB llvm module passes [2]
time: 0.000; rss: 61MB llvm module passes [1]
time: 0.000; rss: 61MB llvm module passes [0]
time: 0.000; rss: 61MB llvm module passes [3]
time: 0.001; rss: 62MB codegen passes [1]
time: 0.001; rss: 62MB codegen passes [2]
time: 0.001; rss: 62MB codegen passes [0]
time: 0.001; rss: 62MB codegen passes [3]
time: 0.001; rss: 63MB codegen passes [1]
time: 0.005; rss: 63MB LLVM passes
time: 0.000; rss: 63MB serialize work products
time: 0.001; rss: 63MB linking
```
r? @eddyb or @nikomatsakis
cc @nrc, @Mark-SimulacrumFile tree
4 files changed
+13
-12
lines changed- src
- librustc_mir/transform
- librustc/mir
4 files changed
+13
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
| 80 | + | |
79 | 81 | | |
80 | | - | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments