Uh oh!
There was an error while loading. Please reload this page.
GVN: Invalidate derefs at loop headers - #147607
Conversation
rustbot
commented
Oct 12, 2025
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
dianqk
commented
Oct 12, 2025
I want to backport the first two commits. @rustbot label beta-nominated |
| #[path = "loop.rs"] | ||
| pub mod loop_; |
There was a problem hiding this comment.
| #[path = "loop.rs"] | |
| pubmod loop_; | |
| pubmod loops; |
To avoid having to use a path attribute.
| let reverse_postorder = body.basic_blocks.reverse_postorder().to_vec(); | ||
| for bb in reverse_postorder { | ||
| // N.B. With loops, reverse postorder cannot produce a valid topological order. |
There was a problem hiding this comment.
Do you mind expanding the comment a bit?
There was a problem hiding this comment.
Sorry, but I was expecting something like:
// A statement or terminator from inside the loop, that is not processed yet, may have performed an indirect write.
jackh726
commented
Oct 12, 2025
Just for clarity re. backport: this has been broken since 1.88? What's the benefit of beta backporting? |
| let reverse_postorder = body.basic_blocks.reverse_postorder().to_vec(); | ||
| for bb in reverse_postorder { | ||
| // N.B. With loops, reverse postorder cannot produce a valid topological order. |
There was a problem hiding this comment.
Sorry, but I was expecting something like:
// A statement or terminator from inside the loop, that is not processed yet, may have performed an indirect write.
| // | bb3 | | | ||
| // | *x=c | -+ | ||
| // +------+ | ||
| if maybe_loop { |
There was a problem hiding this comment.
Would it be enough to check maybe_loop_headers.contains(bb)?
There was a problem hiding this comment.
I think so, maybe I'm too conservative.
cjgillot
commented
Oct 14, 2025
Thanks! |
bors
commented
Oct 14, 2025
GVN: Invalidate derefs at loop headers Fix a miscompiled case I found when re-reviewing rust-lang#132527. r? cjgillot r? oli-obk
Rollup of 11 pull requests Successful merges: - #146277 (Enable `u64` limbs in `core::num::bignum`) - #146976 (constify basic Clone impls) - #147249 (Do two passes of `handle_opaque_type_uses_next`) - #147266 (fix 2 search graph bugs) - #147468 (Implement fs api set_times and set_times_nofollow) - #147497 (`proc_macro` cleanups (3/N)) - #147594 (std: implement `pal::os::exit` for VEXos) - #147596 (Adjust the Arm targets in CI to reflect latest changes) - #147607 (GVN: Invalidate derefs at loop headers) - #147620 (Avoid redundant UB check in RangeFrom slice indexing) - #147647 (Hide vendoring and copyright in GHA group) r? `@ghost` `@rustbot` modify labels: rollup
GVN: Invalidate derefs at loop headers Fix a miscompiled case I found when re-reviewing rust-lang#132527. r? cjgillot r? oli-obk
Rollup of 12 pull requests Successful merges: - #146277 (Enable `u64` limbs in `core::num::bignum`) - #146976 (constify basic Clone impls) - #147249 (Do two passes of `handle_opaque_type_uses_next`) - #147266 (fix 2 search graph bugs) - #147497 (`proc_macro` cleanups (3/N)) - #147546 (Suppress unused_parens for labeled break) - #147548 (Fix ICE for never pattern as closure parameters) - #147594 (std: implement `pal::os::exit` for VEXos) - #147596 (Adjust the Arm targets in CI to reflect latest changes) - #147607 (GVN: Invalidate derefs at loop headers) - #147620 (Avoid redundant UB check in RangeFrom slice indexing) - #147647 (Hide vendoring and copyright in GHA group) r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
saethlin
commented
Oct 14, 2025
@rust-timer build 173ae98 |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Oct 14, 2025
Finished benchmarking commit (173ae98): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 2.7%, secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.635s -> 474.033s (-0.34%) |
bors
commented
Oct 15, 2025
dianqk
commented
Oct 15, 2025
@bors r- |
matthiaskrgr
commented
Oct 15, 2025
@bors retry r- |
apiraino
commented
Oct 16, 2025
Rollup of 12 pull requests Successful merges: - rust-lang#146277 (Enable `u64` limbs in `core::num::bignum`) - rust-lang#146976 (constify basic Clone impls) - rust-lang#147249 (Do two passes of `handle_opaque_type_uses_next`) - rust-lang#147266 (fix 2 search graph bugs) - rust-lang#147497 (`proc_macro` cleanups (3/N)) - rust-lang#147546 (Suppress unused_parens for labeled break) - rust-lang#147548 (Fix ICE for never pattern as closure parameters) - rust-lang#147594 (std: implement `pal::os::exit` for VEXos) - rust-lang#147596 (Adjust the Arm targets in CI to reflect latest changes) - rust-lang#147607 (GVN: Invalidate derefs at loop headers) - rust-lang#147620 (Avoid redundant UB check in RangeFrom slice indexing) - rust-lang#147647 (Hide vendoring and copyright in GHA group) r? `@ghost` `@rustbot` modify labels: rollup
Fix a miscompiled case I found when re-reviewing #132527.
r? cjgillot
r? oli-obk