This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 9a767b6
committed
Auto merge of rust-lang#110820 - cjgillot:faster-dcp, r=oli-obk
Optimize dataflow-const-prop place-tracking infra
Optimization opportunities found while investigating rust-lang#110719
Computing places breadth-first ensures that we create short projections before deep projections, since the former are more likely to be propagated.
The most relevant is the pre-computation of flooded places. Callgrind showed `flood_*` methods and especially `preorder_preinvoke` were especially hot. This PR attempts to pre-compute the set of `ValueIndex` that `preorder_invoke` would visit.
Using this information, we make some `PlaceIndex` inaccessible when they contain no `ValueIndex`, allowing to skip computations for those places.
cc `@jachris` as original authorFile tree
3 files changed
+183
-141
lines changed- compiler
- rustc_mir_dataflow/src
- framework
- rustc_mir_transform/src
3 files changed
+183
-141
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
| 116 | + | |
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 120 | + | |
125 | 121 | | |
126 | 122 | | |
127 | 123 | | |
| |||
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 273 | + | |
280 | 274 | | |
281 | 275 | | |
282 | 276 | | |
283 | | - | |
284 | | - | |
285 | | - | |
| 277 | + | |
286 | 278 | | |
0 commit comments