Repository navigation
Make terminator not optional in BasicBlockData - #166248
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove Option from terminator
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (0a666e4): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.9%, secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 459.547s -> 486.251s (5.81%) |
|
the |
221796e to
ff96bcd
Compare
This comment has been minimized.
This comment has been minimized.
ff96bcd to
ea93526
Compare
This is dead code now, because terminator is never None. The ice is now triggered sooner in the unwrap in `into_basic_blocks`.
This commit only makes the necessary changes. We don't remove terminator() or terminator_mut() methods to avoid too many changes at once and avoid conflicts.
ea93526 to
d923f61
Compare
|
cc @rust-lang/clippy
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Make terminator not optional in BasicBlockData
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (cbf5dae): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.0%, secondary -1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.3%, secondary -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 460.462s -> 458.758s (-0.37%) |
|
Thanks! @bors r=oli-obk |
|
@bors rollup=iffy |
…r, r=oli-obk Make terminator not optional in BasicBlockData This is the final PR for changing `Option<Terminator>` to `Terminator` in `BasicBlockData`. More info in [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808). At this point there should never be a case where the terminator is `None`. All usages of `None` were replaced in preceding PR. This PR should practically be a no-op. First 2 commits remove dead code, the final commit replaces the Option. This PR does try to do only minimal necessary changes to avoid conflicts - i.e. we don't remove `terminator()` and `terminator_mut()` methods or any other cleanups. This should be reviewable commit by commit. For some changes that are just removing ifs, it's useful to hide whitespace changes.
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #165489 (Add two extra early return checks to `is_recursive_terminator`) - #166248 (Make terminator not optional in BasicBlockData) - #166264 (Perf: Improve looking up previously scanned items in dead-code) - #166492 (rustc-lint: avoid allocation and Ident reconstruction in find_duplicated_parameters)
Rollup merge of #166248 - panstromek:remove-option-terminator, r=oli-obk Make terminator not optional in BasicBlockData This is the final PR for changing `Option<Terminator>` to `Terminator` in `BasicBlockData`. More info in [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808). At this point there should never be a case where the terminator is `None`. All usages of `None` were replaced in preceding PR. This PR should practically be a no-op. First 2 commits remove dead code, the final commit replaces the Option. This PR does try to do only minimal necessary changes to avoid conflicts - i.e. we don't remove `terminator()` and `terminator_mut()` methods or any other cleanups. This should be reviewable commit by commit. For some changes that are just removing ifs, it's useful to hide whitespace changes.
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (4efae3c): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -1.8%, secondary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Artifact size: 405.62 MiB -> 405.65 MiB (0.01%) |
…-cleanups, r=tmiasko Remove some outdated comments about None terminator The option was removed in rust-lang#166248, so those comments are no longer relevant.
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - rust-lang/rust#165489 (Add two extra early return checks to `is_recursive_terminator`) - rust-lang/rust#166248 (Make terminator not optional in BasicBlockData) - rust-lang/rust#166264 (Perf: Improve looking up previously scanned items in dead-code) - rust-lang/rust#166492 (rustc-lint: avoid allocation and Ident reconstruction in find_duplicated_parameters)
View all comments
This is the final PR for changing
Option<Terminator>toTerminatorinBasicBlockData. More info in this thread.At this point there should never be a case where the terminator is
None. All usages ofNonewere replaced in preceding PR. This PR should practically be a no-op.First 2 commits remove dead code, the final commit replaces the Option. This PR does try to do only minimal necessary changes to avoid conflicts - i.e. we don't remove
terminator()andterminator_mut()methods or any other cleanups.This should be reviewable commit by commit. For some changes that are just removing ifs, it's useful to hide whitespace changes.