Move cmp_in_dominator_order out of graph dominator computation#132022
Move cmp_in_dominator_order out of graph dominator computation#132022bors merged 1 commit intorust-lang:masterfrom
cmp_in_dominator_order out of graph dominator computation#132022Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
One of my other motivations for doing this is that in the future I plan to also store |
|
There are no coverage benchmarks, but I'm curious to see whether this is a measurable improvement for the rest of the compiler. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Move `cmp_in_dominator_order` out of graph dominator computation Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again. This avoids wasted work when computing graph dominators for any other purpose.
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
|
As I half-expected, any improvement is too small to see among the noise. In that case, no reason to avoid rollup. @bors rollup=maybe |
292afd8 to
3708650
Compare
Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again. This avoids wasted work when computing graph dominators for any other purpose.
3708650 to
7f4dd9b
Compare
|
@bors r+ |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125205 (Fixup Windows verbatim paths when used with the `include!` macro) - rust-lang#131049 (Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection`) - rust-lang#131549 (Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function) - rust-lang#131731 (add `TestFloatParse` to `tools.rs` for bootstrap) - rust-lang#131732 (Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES) - rust-lang#132006 (don't stage-off to previous compiler when CI rustc is available) - rust-lang#132022 (Move `cmp_in_dominator_order` out of graph dominator computation) - rust-lang#132033 (compiletest: Make `line_directive` return a `DirectiveLine`) r? `@ghost` `@rustbot` modify labels: rollup
|
Perf report contains: shouldn't this be tried again to check if it was spurious? |
| let reverse_post_order = graph::iterate::reverse_post_order(&this, this.start_node()); | ||
| // The coverage graph is created by traversal, so all nodes are reachable. | ||
| assert_eq!(reverse_post_order.len(), this.num_nodes()); | ||
| for (rank, bcb) in (0u32..).zip(reverse_post_order) { |
There was a problem hiding this comment.
Nit : reverse_post_order.enumerate() ?
R=me either way
There was a problem hiding this comment.
The node indices being ranked are 32-bit values, so using u32 for the rank (instead of usize) was intentional.
Rollup merge of rust-lang#132022 - Zalathar:dominator-order, r=tmiasko Move `cmp_in_dominator_order` out of graph dominator computation Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again. This avoids wasted work when computing graph dominators for any other purpose.
It was extremely unlikely for this PR to have caused a timeout, especially since the stage 2 dist build succeeded. So I didn't bother. |
Dominator-order information is only needed for coverage graphs, and is easy enough to collect by just traversing the graph again.
This avoids wasted work when computing graph dominators for any other purpose.