Skip to content

[PERF] For #147886 - #150222

Closed
dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:perf/gvn-new-deref-arg
Closed

[PERF] For #147886#150222
dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:perf/gvn-new-deref-arg

Conversation

@dianqk

Copy link
Copy Markdown
Member

r? ghost

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 21, 2025
@dianqk

Copy link
Copy Markdown
MemberAuthor

For #147886
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Dec 21, 2025
@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 21, 2025
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-gcc failed! Check out the build log: (web)(plain enhanced)(plain)

Click to see the possible cause of the failure (guessed by this bot)
45 StorageLive(_6);
47 StorageLive(_7);
48 _7 = copy _4;
49 - _0 = AllCopy { a: move _5, b: move _6, c: move _7 };
- + _0 = copy (*_8);
+ + _0 = AllCopy { a: copy _2, b: copy _3, c: copy _4 };
51 StorageDead(_7);
52 StorageDead(_6);
53 StorageDead(_5);
thread '[mir-opt] tests/mir-opt/gvn_copy_aggregate.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:84:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/gvn_copy_aggregate.all_copy_2.GVN.diff
stack backtrace:
5: __rustc::rust_begin_unwind
at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:689:5
6: core::panicking::panic_fmt
at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/panicking.rs:80:14
7: <compiletest::runtest::TestCx>::run_revision
8: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/gvn_copy_aggregate.rs stdout end ----
---- [mir-opt] tests/mir-opt/pre-codegen/slice_filter.rs stdout ----
3 fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool {
4 let mut _0: bool;
5 let mut _3: &(usize, usize, usize, usize);
- let mut _6: bool;
+ let mut _4: &(usize, usize, usize, usize);
+ let mut _5: &(usize, usize, usize, usize);
---
16 let mut _20: &&usize;
17 let mut _21: &&usize;
18 let mut _22: &&usize;
19 let mut _23: &&usize;
20 let mut _24: &&usize;
+ let mut _25: &&usize;
+ let mut _26: &&usize;
+ let mut _27: &&usize;
21 scope 1 {
- debug a => _13;
- debug b => _14;
- debug c => _15;
- debug d => _16;
+ debug a => _16;
+ debug b => _17;
+ debug c => _18;
+ debug d => _19;
26 scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
- debug self => _17;
- debug other => _18;
+ debug self => _20;
+ debug other => _21;
29 scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
- debug self => _13;
- debug other => _15;
- let mut _4: usize;
- let mut _5: usize;
+ debug self => _16;
+ debug other => _18;
+ let mut _7: usize;
+ let mut _8: usize;
34 }
35 }
36 scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
- debug self => _19;
- debug other => _20;
+ debug self => _22;
+ debug other => _23;
39 scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
- debug self => _16;
- debug other => _14;
- let mut _7: usize;
- let mut _8: usize;
+ debug self => _19;
+ debug other => _17;
+ let mut _10: usize;
+ let mut _11: usize;
44 }
45 }
46 scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
- debug self => _21;
- debug other => _22;
+ debug self => _24;
+ debug other => _25;
49 scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
- debug self => _15;
- debug other => _13;
+ debug self => _18;
+ debug other => _16;
52 }
53 }
54 scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
- debug self => _23;
- debug other => _24;
+ debug self => _26;
+ debug other => _27;
57 scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
- debug self => _14;
- debug other => _16;
- let mut _11: usize;
- let mut _12: usize;
+ debug self => _17;
+ debug other => _19;
+ let mut _14: usize;
+ let mut _15: usize;
62 }
63 }
64 }
65 66 bb0: {
67 _3 = copy (*_2);
- // DBG: _13 = &((*_3).0: usize);
- // DBG: _14 = &((*_3).1: usize);
- // DBG: _15 = &((*_3).2: usize);
- // DBG: _16 = &((*_3).3: usize);
- StorageLive(_6);
- // DBG: _17 = &_13;
- // DBG: _18 = &?;
- _4 = copy ((*_3).0: usize);
- _5 = copy ((*_3).2: usize);
- _6 = Le(copy _4, copy _5);
- switchInt(move _6) -> [0: bb2, otherwise: bb1];
+ // DBG: _16 = &((*_3).0: usize);
+ _4 = copy (*_2);
+ // DBG: _17 = &((*_4).1: usize);
+ _5 = copy (*_2);
+ // DBG: _18 = &((*_5).2: usize);
+ _6 = copy (*_2);
+ // DBG: _19 = &((*_6).3: usize);
+ StorageLive(_9);
+ // DBG: _20 = &_16;
+ // DBG: _21 = &?;
+ _7 = copy ((*_3).0: usize);
+ _8 = copy ((*_5).2: usize);
+ _9 = Le(copy _7, copy _8);
+ switchInt(move _9) -> [0: bb2, otherwise: bb1];
79 }
80 81 bb1: {
- StorageLive(_9);
- // DBG: _19 = &_16;
- // DBG: _20 = &?;
- StorageLive(_7);
- _7 = copy ((*_3).3: usize);
- StorageLive(_8);
- _8 = copy ((*_3).1: usize);
- _9 = Le(move _7, move _8);
- StorageDead(_8);
- StorageDead(_7);
- switchInt(move _9) -> [0: bb2, otherwise: bb6];
+ StorageLive(_12);
+ // DBG: _22 = &_19;
+ // DBG: _23 = &?;
+ StorageLive(_10);
+ _10 = copy ((*_6).3: usize);
+ StorageLive(_11);
+ _11 = copy ((*_4).1: usize);
+ _12 = Le(move _10, move _11);
+ StorageDead(_11);
+ StorageDead(_10);
+ switchInt(move _12) -> [0: bb2, otherwise: bb6];
93 }
94 95 bb2: {
- StorageLive(_10);
- // DBG: _21 = &_15;
- // DBG: _22 = &?;
- _10 = Le(copy _5, copy _4);
- switchInt(move _10) -> [0: bb3, otherwise: bb4];
+ StorageLive(_13);
+ // DBG: _24 = &_18;
+ // DBG: _25 = &?;
+ _13 = Le(copy _8, copy _7);
+ switchInt(move _13) -> [0: bb3, otherwise: bb4];
101 }
102 103 bb3: {
106 }
107 108 bb4: {
- // DBG: _23 = &_14;
- // DBG: _24 = &?;
- StorageLive(_11);
- _11 = copy ((*_3).1: usize);
- StorageLive(_12);
- _12 = copy ((*_3).3: usize);
- _0 = Le(move _11, move _12);
- StorageDead(_12);
- StorageDead(_11);
+ // DBG: _26 = &_17;
+ // DBG: _27 = &?;
+ StorageLive(_14);
+ _14 = copy ((*_4).1: usize);
+ StorageLive(_15);
+ _15 = copy ((*_6).3: usize);
+ _0 = Le(move _14, move _15);
+ StorageDead(_15);
+ StorageDead(_14);
118 goto -> bb5;
119 }
120 ---
135 }
136 }
thread '[mir-opt] tests/mir-opt/pre-codegen/slice_filter.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:84:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
stack backtrace:
5: __rustc::rust_begin_unwind
at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:689:5
6: core::panicking::panic_fmt
at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/panicking.rs:80:14

For more information how to resolve CI failures of this job, visit this link.

@rust-bors

rust-borsBot commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: d0d2850 (d0d28502a066f9eb6d1017c49c683ae727c5b021, parent: d0e6d778cf1563beb494ca3f1b7858e00776722f)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d0d2850): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-0.5%[-0.5%, -0.5%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-0.5%[-0.5%, -0.5%]1

Max RSS (memory usage)

Results (primary -0.3%, secondary -1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
2.4%[1.7%, 3.0%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-5.5%[-5.5%, -5.5%]1
Improvements ✅
(secondary)
-1.0%[-1.0%, -1.0%]1
All ❌✅ (primary)-0.3%[-5.5%, 3.0%]3

Cycles

Results (secondary -1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-1.7%[-1.7%, -1.7%]1
All ❌✅ (primary)--0

Binary size

Results (primary -0.1%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
0.0%[0.0%, 0.0%]1
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]1
Improvements ✅
(primary)
-0.2%[-0.3%, -0.1%]2
Improvements ✅
(secondary)
-0.1%[-0.1%, -0.1%]1
All ❌✅ (primary)-0.1%[-0.3%, 0.0%]3

Bootstrap: 481.858s -> 480.843s (-0.21%)
Artifact size: 390.61 MiB -> 390.53 MiB (-0.02%)

@rustbotrustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 21, 2025
@dianqkdianqk removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 28, 2025
@dianqkdianqk closed this Dec 28, 2025
@dianqk
dianqk deleted the perf/gvn-new-deref-arg branch December 28, 2025 12:56
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dianqk@rust-timer@rust-log-analyzer@rustbot