Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perf] Enable some more MIR optimizations #111061

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented May 1, 2023

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 1, 2023
@cjgillot
Copy link
Contributor Author

cjgillot commented May 1, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 1, 2023

⌛ Trying commit 8d89b62939623260405128d7bc26b26fd220b7fd with merge 735363f374353fd1daa8e47c4c6562822c8697e3...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 1, 2023

💔 Test failed - checks-actions

@rust-log-analyzer

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 1, 2023
@cjgillot
Copy link
Contributor Author

cjgillot commented May 1, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2023
@bors
Copy link
Contributor

bors commented May 1, 2023

⌛ Trying commit 0881df6b462977387687efb3f24415eb92b05963 with merge 5839f4fda9eb2f08b621e92295cef6b3dd21839a...

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 1, 2023

💔 Test failed - checks-actions

@cjgillot
Copy link
Contributor Author

cjgillot commented May 1, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 1, 2023

⌛ Trying commit 5d80f8f070c3ca26dfd538c3b8d1a551efd60ac3 with merge 21a5d892227859d0e862af7df261cb38e8db5abc...

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 1, 2023

💔 Test failed - checks-actions

@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2024
[perf] Enable some more MIR optimizations

r? `@ghost`
@bors
Copy link
Contributor

bors commented Jan 20, 2024

⌛ Trying commit 0c2525b with merge 9ef5d52...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=cjgillot
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_b6ff1c27-973a-44b5-b964-437fb9494f66
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=1fd86771b525d2588ce60062d68c53f5d941afd5
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_b6ff1c27-973a-44b5-b964-437fb9494f66
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_b6ff1c27-973a-44b5-b964-437fb9494f66
GITHUB_TRIGGERING_ACTOR=cjgillot
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/111061/merge
GITHUB_WORKFLOW_SHA=1fd86771b525d2588ce60062d68c53f5d941afd5
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sat Jan 20 00:22:39 UTC 2024
  network time: Sat, 20 Jan 2024 00:22:39 GMT
  network time: Sat, 20 Jan 2024 00:22:39 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---

running 279 tests
........................................................................................  88/279
i.................................................................................i..i.i 176/279
........................................i....i...iii............iiF.......i............. 264/279

failures:

---- [mir-opt] tests/mir-opt/pre-codegen/loops.rs stdout ----
---- [mir-opt] tests/mir-opt/pre-codegen/loops.rs stdout ----
3 fn vec_move(_1: Vec<impl Sized>) -> () {
4     debug v => _1;
5     let mut _0: ();
-     let mut _28: std::vec::IntoIter<impl Sized>;
-     let mut _29: std::vec::IntoIter<impl Sized>;
-     let mut _60: std::option::Option<impl Sized>;
-     let _89: ();
+     let mut _2: std::vec::IntoIter<impl Sized>;
+     let mut _3: std::vec::IntoIter<impl Sized>;
+     let mut _4: &mut std::vec::IntoIter<impl Sized>;
Build completed unsuccessfully in 0:13:57
+     let mut _5: std::option::Option<impl Sized>;
+     let mut _6: isize;
+     let _8: ();
10     scope 1 {
-         debug iter => _29;
-         let _88: impl Sized;
+         debug iter => _3;
+         let _7: impl Sized;
13         scope 2 {
-             debug x => _88;
+             debug x => _7;
15         }
-         scope 77 (inlined <std::vec::IntoIter<impl Sized> as Iterator>::next) {
-             debug (*(self: &mut std::vec::IntoIter<impl Sized>)) => _29;
-             let mut _30: bool;
-             let mut _31: *const *const impl Sized;
-             let mut _32: *const std::ptr::NonNull<impl Sized>;
-             let _33: std::ptr::NonNull<impl Sized>;
-             let mut _49: bool;
-             let _50: std::ptr::NonNull<impl Sized>;
-             let mut _53: std::ptr::NonNull<impl Sized>;
-             let mut _59: impl Sized;
-             let mut _61: std::ptr::NonNull<impl Sized>;
-             let mut _68: *mut impl Sized;
-             let mut _69: *const impl Sized;
-             let mut _70: *mut impl Sized;
-             let mut _71: bool;
-             let mut _72: *const impl Sized;
-             let mut _78: *const impl Sized;
-             let mut _87: impl Sized;
-             scope 78 {
-                 scope 104 (inlined #[track_caller] zeroed::<impl Sized>) {
-                     let _79: ();
-                     let mut _84: std::mem::MaybeUninit<impl Sized>;
-                     scope 105 {
-                         scope 106 (inlined MaybeUninit::<impl Sized>::zeroed) {
-                             let mut _80: std::mem::MaybeUninit<impl Sized>;
-                             let mut _82: *mut impl Sized;
-                             let _83: ();
-                             scope 107 {
-                                 debug u => _80;
-                                 scope 108 {
-                                     scope 110 (inlined MaybeUninit::<impl Sized>::as_mut_ptr) {
-                                         debug (*(self: &mut MaybeUninit<impl Sized>)) => _80;
-                                         let mut _81: *mut std::mem::MaybeUninit<impl Sized>;
-                                     }
-                                     scope 111 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::write_bytes) {
-                                         debug self => _82;
-                                         debug val => const 0_u8;
-                                         debug count => const 1_usize;
-                                         scope 112 {
-                                             scope 113 (inlined write_bytes::<impl Sized>) {
-                                                 debug dst => _82;
-                                                 debug val => const 0_u8;
-                                                 debug count => const 1_usize;
-                                                 scope 114 {
-                                                     scope 115 (inlined write_bytes::runtime::<impl Sized>) {
-                                                         debug dst => _82;
-                                                         let mut _95: *const impl Sized;
-                                                         scope 116 (inlined intrinsics::is_aligned_and_not_null::<impl Sized>) {
-                                                             debug ptr => _95;
-                                                             scope 117 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                                                                 debug self => _95;
-                                                                 let mut _96: *const u8;
-                                                                 scope 118 {
-                                                                     scope 119 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                                                         debug ptr => _96;
-                                                                         scope 120 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                                                             debug self => _96;
-                                                                             let mut _97: *const ();
-                                                                             scope 121 {
-                                                                                 scope 122 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                                                                     debug self => _96;
-                                                                             }
-                                                                         }
-                                                                     }
-                                                                 }
-                                                                 }
-                                                             }
-                                                             scope 123 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_aligned) {
-                                                                 debug self => _95;
-                                                                 let mut _98: usize;
-                                                                 scope 124 (inlined align_of::<impl Sized>) {
-                                                                 }
-                                                                 scope 125 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_aligned_to) {
-                                                                     debug self => _95;
-                                                                     debug align => _98;
-                                                                     let mut _99: &[&str];
-                                                                     scope 126 {
-                                                                         scope 129 (inlined std::ptr::const_ptr::<impl *const impl Sized>::cast::<()>) {
-                                                                             debug self => _95;
-                                                                         }
-                                                                         scope 131 (inlined std::ptr::const_ptr::<impl *const T>::is_aligned_to::runtime_impl) {
-                                                                             debug ptr => _97;
-                                                                             debug align => _98;
-                                                                             scope 132 (inlined std::ptr::const_ptr::<impl *const ()>::addr) {
-                                                                                 debug self => _97;
-                                                                                 scope 133 {
-                                                                                     scope 134 (inlined std::ptr::const_ptr::<impl *const ()>::cast::<()>) {
-                                                                                         debug self => _97;
-                                                                                 }
-                                                                             }
-                                                                         }
-                                                                     }
-                                                                     }
-                                                                     scope 127 (inlined core::num::<impl usize>::is_power_of_two) {
-                                                                         debug self => _98;
-                                                                         scope 128 (inlined core::num::<impl usize>::count_ones) {
-                                                                             debug self => _98;
-                                                                     }
-                                                                     }
-                                                                     scope 130 (inlined Arguments::<'_>::new_const) {
-                                                                         debug pieces => _99;
-                                                                 }
-                                                             }
-                                                         }
-                                                     }
-                                                     }
-                                                 }
-                                             }
-                                         }
-                                     }
-                                 }
-                             }
-                             scope 109 (inlined MaybeUninit::<impl Sized>::uninit) {
-                         }
-                         }
-                         scope 135 (inlined #[track_caller] MaybeUninit::<impl Sized>::assume_init) {
-                             debug self => _84;
-                             let _85: ();
-                             let mut _86: std::mem::ManuallyDrop<impl Sized>;
-                             scope 136 {
-                                 scope 137 (inlined ManuallyDrop::<impl Sized>::into_inner) {
-                                     debug slot => _86;
-                             }
-                         }
-                     }
-                 }
-                 }
-             }
-             scope 79 {
-                 scope 80 {
-                 }
-             }
-             scope 81 {
-                 debug old => _50;
-                 scope 82 {
-                     scope 155 (inlined NonNull::<impl Sized>::add) {
-                         debug self => _50;
-                         debug count => const 1_usize;
-                         let mut _51: *const impl Sized;
-                         let mut _52: *const impl Sized;
-                         scope 156 {
-                     }
-                 }
-                 scope 83 {
-                 scope 83 {
-                     scope 157 (inlined NonNull::<impl Sized>::as_ptr) {
-                         debug self => _50;
-                         let mut _57: bool;
-                         let mut _58: bool;
-                         scope 158 {
-                             scope 159 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                                 debug self => _51;
-                                 let mut _54: *const u8;
-                                 scope 160 {
-                                     scope 161 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                         debug ptr => _54;
-                                         let mut _56: usize;
-                                         scope 162 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                             debug self => _54;
-                                             let mut _55: *const ();
-                                             scope 163 {
-                                                 scope 164 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                                     debug self => _54;
-                                             }
-                                         }
-                                     }
-                                 }
-                                 }
-                             }
-                         }
-                     }
-                     scope 165 (inlined std::ptr::read::<impl Sized>) {
-                         debug src => _51;
-                         scope 166 {
-                             scope 167 (inlined std::ptr::read::runtime::<impl Sized>) {
-                                 debug src => _51;
-                                 scope 168 (inlined intrinsics::is_aligned_and_not_null::<impl Sized>) {
-                                     debug ptr => _51;
-                                     scope 169 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                                         debug self => _51;
-                                         let mut _100: *const u8;
-                                         scope 170 {
-                                             scope 171 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                                 debug ptr => _100;
-                                                 scope 172 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                                     debug self => _100;
-                                                     let mut _101: *const ();
-                                                     scope 173 {
-                                                         scope 174 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                                             debug self => _100;
-                                                     }
-                                                 }
-                                             }
-                                         }
-                                         }
-                                     }
-                                     scope 175 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_aligned) {
-                                         debug self => _51;
-                                         let mut _102: usize;
-                                         scope 176 (inlined align_of::<impl Sized>) {
-                                         }
-                                         scope 177 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_aligned_to) {
-                                             debug self => _51;
-                                             debug align => _102;
-                                             let mut _103: &[&str];
-                                             scope 178 {
-                                                 scope 181 (inlined std::ptr::const_ptr::<impl *const impl Sized>::cast::<()>) {
-                                                     debug self => _51;
-                                                 }
-                                                 scope 183 (inlined std::ptr::const_ptr::<impl *const T>::is_aligned_to::runtime_impl) {
-                                                     debug ptr => _101;
-                                                     debug align => _102;
-                                                     scope 184 (inlined std::ptr::const_ptr::<impl *const ()>::addr) {
-                                                         debug self => _101;
-                                                         scope 185 {
-                                                             scope 186 (inlined std::ptr::const_ptr::<impl *const ()>::cast::<()>) {
-                                                                 debug self => _101;
-                                                         }
-                                                     }
-                                                 }
-                                             }
-                                             }
-                                             scope 179 (inlined core::num::<impl usize>::is_power_of_two) {
-                                                 debug self => _102;
-                                                 scope 180 (inlined core::num::<impl usize>::count_ones) {
-                                                     debug self => _102;
-                                             }
-                                             }
-                                             scope 182 (inlined Arguments::<'_>::new_const) {
-                                                 debug pieces => _103;
-                                         }
-                                     }
-                                 }
-                             }
-                             }
-                         }
-                     }
-                 }
-             }
-             scope 84 (inlined NonNull::<impl Sized>::as_ptr) {
-                 debug self => _61;
-                 let mut _62: *const impl Sized;
-                 let mut _66: bool;
-                 let mut _67: bool;
-                 scope 85 {
-                     scope 86 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                         debug self => _62;
-                         let mut _63: *const u8;
-                         scope 87 {
-                             scope 88 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                 debug ptr => _63;
-                                 let mut _65: usize;
-                                 scope 89 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                     debug self => _63;
-                                     let mut _64: *const ();
-                                     scope 90 {
-                                         scope 91 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                             debug self => _63;
-                                     }
-                                 }
-                             }
-                         }
-                         }
-                     }
-                 }
-             }
-             scope 92 (inlined std::ptr::const_ptr::<impl *const impl Sized>::wrapping_byte_sub) {
-                 debug self => _72;
-                 debug count => const 1_usize;
-                 let mut _73: *const u8;
-                 let mut _74: *const u8;
-                 scope 93 (inlined std::ptr::const_ptr::<impl *const impl Sized>::cast::<u8>) {
-                     debug self => _72;
-                 }
-                 scope 94 (inlined std::ptr::const_ptr::<impl *const u8>::wrapping_sub) {
-                     debug self => _73;
-                     debug count => const 1_usize;
-                     scope 95 (inlined core::num::<impl isize>::wrapping_neg) {
-                         debug self => const 1_isize;
-                         scope 96 (inlined core::num::<impl isize>::wrapping_sub) {
-                             debug self => const 0_isize;
-                             debug rhs => const 1_isize;
-                     }
-                     }
-                     scope 97 (inlined std::ptr::const_ptr::<impl *const u8>::wrapping_offset) {
-                         debug self => _73;
-                         debug count => const -1_isize;
-                         scope 98 {
-                     }
-                 }
-                 }
-                 scope 99 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<impl Sized>) {
-                     debug self => _74;
-                     debug meta => _72;
-                     let mut _75: *const ();
-                     scope 100 (inlined std::ptr::metadata::<impl Sized>) {
-                         debug ptr => _72;
-                         scope 101 {
-                     }
-                     }
-                     scope 102 (inlined std::ptr::from_raw_parts::<impl Sized>) {
-                         debug data_address => _75;
-                         debug metadata => const ();
-                         let mut _76: std::ptr::metadata::PtrComponents<impl Sized>;
-                         let mut _77: std::ptr::metadata::PtrRepr<impl Sized>;
-                         scope 103 {
-                     }
-                 }
-             }
-             }
-             scope 138 (inlined <NonNull<impl Sized> as PartialEq>::eq) {
-                 debug (*(self: &NonNull<impl Sized>)) => (_29.4: std::ptr::NonNull<impl Sized>);
-                 debug (*(other: &NonNull<impl Sized>)) => _33;
-                 let mut _34: std::ptr::NonNull<impl Sized>;
-                 let mut _41: *mut impl Sized;
-                 let mut _48: *mut impl Sized;
-                 scope 139 (inlined NonNull::<impl Sized>::as_ptr) {
-                     debug self => _34;
-                     let mut _35: *const impl Sized;
-                     let mut _39: bool;
-                     let mut _40: bool;
-                     scope 140 {
-                         scope 141 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                             debug self => _35;
-                             let mut _36: *const u8;
-                             scope 142 {
-                                 scope 143 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                     debug ptr => _36;
-                                     let mut _38: usize;
-                                     scope 144 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                         debug self => _36;
-                                         let mut _37: *const ();
-                                         scope 145 {
-                                             scope 146 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                                 debug self => _36;
-                                         }
-                                     }
-                                 }
-                             }
-                             }
-                         }
-                     }
-                 }
-                 scope 147 (inlined NonNull::<impl Sized>::as_ptr) {
-                     debug self => _33;
-                     let mut _42: *const impl Sized;
-                     let mut _46: bool;
-                     let mut _47: bool;
-                     scope 148 {
-                         scope 149 (inlined std::ptr::const_ptr::<impl *const impl Sized>::is_null) {
-                             debug self => _42;
-                             let mut _43: *const u8;
-                             scope 150 {
-                                 scope 151 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
-                                     debug ptr => _43;
-                                     let mut _45: usize;
-                                     scope 152 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
-                                         debug self => _43;
-                                         let mut _44: *const ();
-                                         scope 153 {
-                                             scope 154 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
-                                                 debug self => _43;
-                                         }
-                                     }
-                                 }
-                             }
-                             }
-                         }
-                     }
-                 }
-             }
-         }
388     }
-     scope 3 (inlined <Vec<impl Sized> as IntoIterator>::into_iter) {
-         debug self => _1;
-         let mut _11: bool;
-         let mut _12: usize;
-         let mut _13: *mut impl Sized;
-         let mut _14: *const impl Sized;
-         let mut _15: usize;
-         let mut _24: *mut impl Sized;
-         let mut _26: usize;
-         scope 4 {
-             let mut _2: std::mem::ManuallyDrop<std::vec::Vec<impl Sized>>;
-             scope 5 {
-                 debug me => _2;
-                 scope 6 {
-                     debug alloc => const ManuallyDrop::<std::alloc::Global> {{ value: std::alloc::Global }};
-                     let _10: *mut impl Sized;
-                     scope 7 {
-                         debug begin => _10;
-                         scope 8 {
-                             debug end => _14;
-                             scope 9 {
-                                 debug cap => _26;
-                                 let _27: std::ptr::NonNull<impl Sized>;
-                                 scope 10 {
-                                     debug buf => _27;
-                                 }
-                                 scope 68 (inlined NonNull::<impl Sized>::new_unchecked) {
-                                     debug ptr => _10;
-                                     scope 69 {
-                                         scope 70 (inlined NonNull::<T>::new_unchecked::runtime::<impl Sized>) {
-                                             debug ptr => _10;
-                                             scope 71 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::is_null) {
-                                                 debug self => _10;
-                                                 let mut _94: *mut u8;
-                                                 scope 72 {
-                                                     scope 73 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
-                                                         debug ptr => _94;
-                                                         scope 74 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
-                                                             debug self => _94;
-                                                             scope 75 {
-                                                                 scope 76 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
-                                                                     debug self => _94;
-                                                             }
-                                                         }
-                                                     }
-                                                 }
-                                                 }
-                                             }
-                                         }
-                                     }
-                                 }
-                             }
-                             scope 66 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
-                                 debug (*(self: &ManuallyDrop<Vec<impl Sized>>)) => _2;
-                             }
-                             scope 67 (inlined alloc::raw_vec::RawVec::<impl Sized>::capacity) {
-                                 debug (*(self: &alloc::raw_vec::RawVec<impl Sized>)) => (_1.0: alloc::raw_vec::RawVec<impl Sized>);
-                                 let mut _25: bool;
-                         }
-                         }
-                         scope 50 (inlined <ManuallyDrop<Vec<impl Sized>> as Deref>::deref) {
-                             debug (*(self: &ManuallyDrop<Vec<impl Sized>>)) => _2;
-                         }
-                         scope 51 (inlined Vec::<impl Sized>::len) {
-                             debug (*(self: &Vec<impl Sized>)) => _1;
-                         }
-                         scope 52 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::wrapping_byte_add) {
-                             debug self => _10;
-                             debug count => _12;
-                             let mut _16: *mut u8;
-                             let mut _19: *mut u8;
-                             scope 53 (inlined std::ptr::mut_ptr::<impl *mut impl Sized>::cast::<u8>) {
-                                 debug self => _10;
-                             }
-                             scope 54 (inlined std::ptr::mut_ptr::<impl *mut u8>::wrapping_add) {
-                                 debug self => _16;
-                                 debug count => _12;
-                                 let mut _17: isize;
-                                 scope 55 (inlined std::ptr::mut_ptr::<impl *mut u8>::wrapping_offset) {
-                                     debug self => _16;
-                                     debug count => _17;
-                                     let mut _18: *const u8;
-                                     scope 56 {
-                                 }
-                             }
-                             }
-                             scope 57 (inlined std::ptr::mut_ptr::<impl *mut u8>::with_metadata_of::<impl Sized>) {
-                                 debug self => _19;
-                                 debug meta => _4;
-                                 let mut _20: *mut ();
-                                 scope 58 (inlined std::ptr::metadata::<impl Sized>) {
-                                     debug ptr => _4;
-                                     scope 59 {
-                                 }
---
-         StorageDead(_70);
-         goto -> bb23;
-     }
- 
-     bb12: {
-         StorageLive(_71);
-         StorageLive(_68);
-         StorageLive(_61);
-         _61 = (_29.4: std::ptr::NonNull<impl Sized>);
-         StorageLive(_62);
-         StorageLive(_67);
-         StorageLive(_66);
-         _62 = (_61.0: *const impl Sized);
-         StorageLive(_63);
-         _63 = _62 as *const u8 (PtrToPtr);
-         StorageLive(_65);
-         StorageLive(_64);
-         _64 = _62 as *const () (PtrToPtr);
-         _65 = move _64 as usize (Transmute);
-         StorageDead(_64);
-         _66 = Eq(move _65, const 0_usize);
-         StorageDead(_65);
-         StorageDead(_63);
-         _67 = Not(move _66);
-         StorageDead(_66);
-         assume(move _67);
-         StorageDead(_67);
-         _68 = _62 as *mut impl Sized (PtrToPtr);
-         StorageDead(_62);
-         StorageDead(_61);
-         StorageLive(_69);
-         _69 = (_29.5: *const impl Sized);
-         _70 = move _69 as *mut impl Sized (PtrToPtr);
-         StorageDead(_69);
-         _71 = Eq(move _68, _70);
-         switchInt(move _71) -> [0: bb13, otherwise: bb22];
- 
-     bb13: {
-         StorageDead(_68);
-         StorageLive(_78);
-         StorageLive(_78);
-         StorageLive(_72);
-         _72 = (_29.5: *const impl Sized);
-         StorageLive(_74);
-         StorageLive(_73);
-         _73 = _72 as *const u8 (PtrToPtr);
-         _74 = arith_offset::<u8>(move _73, const -1_isize) -> [return: bb14, unwind unreachable];
- 
-     bb14: {
-         StorageDead(_73);
-         StorageLive(_75);
-         StorageLive(_75);
-         _75 = _74 as *const () (PtrToPtr);
-         StorageLive(_77);
-         StorageLive(_76);
-         _76 = std::ptr::metadata::PtrComponents::<impl Sized> { data_address: _75, metadata: const () };
-         _77 = std::ptr::metadata::PtrRepr::<impl Sized> { const_ptr: move _76 };
-         StorageDead(_76);
-         _78 = (_77.0: *const impl Sized);
-         StorageDead(_77);
-         StorageDead(_75);
-         StorageDead(_74);
-         StorageDead(_72);
-         (_29.5: *const impl Sized) = move _78;
-         StorageDead(_78);
-         StorageLive(_87);
-         _79 = assert_zero_valid::<impl Sized>() -> [return: bb15, unwind unreachable];
- 
-     bb15: {
-         StorageLive(_84);
-         StorageLive(_80);
-         StorageLive(_80);
-         _80 = MaybeUninit::<impl Sized> { uninit: const () };
-         StorageLive(_82);
-         StorageLive(_81);
-         _81 = &raw mut _80;
-         _82 = _81 as *mut impl Sized (PtrToPtr);
-         StorageDead(_81);
-         StorageLive(_95);
-         StorageLive(_96);
-         StorageLive(_97);
-         StorageLive(_98);
-         StorageLive(_99);
-         _83 = write_bytes::write_bytes::<impl Sized>(move _82, const 0_u8, const 1_usize) -> [return: bb16, unwind unreachable];
- 
-     bb16: {
-         StorageDead(_99);
-         StorageDead(_98);
-         StorageDead(_98);
-         StorageDead(_97);
-         StorageDead(_96);
-         StorageDead(_95);
-         StorageDead(_82);
-         _84 = move _80;
-         StorageDead(_80);
-         _85 = assert_inhabited::<impl Sized>() -> [return: bb17, unwind unreachable];
- 
-     bb17: {
-         StorageLive(_86);
-         StorageLive(_86);
-         _86 = move (_84.1: std::mem::ManuallyDrop<impl Sized>);
-         _87 = move (_86.0: impl Sized);
-         StorageDead(_86);
-         StorageDead(_84);
-         _60 = Option::<impl Sized>::Some(move _87);
-         StorageDead(_87);
-         StorageDead(_71);
-         StorageDead(_30);
-         StorageDead(_51);
-         StorageDead(_50);
-         StorageDead(_33);
-         StorageDead(_70);
-         goto -> bb18;
- 
-     bb18: {
-     bb18: {
-         _88 = move ((_60 as Some).0: impl Sized);
-         _89 = opaque::<impl Sized>(move _88) -> [return: bb19, unwind: bb20];
- 
-     bb19: {
-         StorageDead(_60);
-         goto -> bb8;
-         goto -> bb8;
-     }
- 
-     bb20 (cleanup): {
-         drop(_29) -> [return: bb21, unwind terminate(cleanup)];
- 
- 
-     bb21 (cleanup): {
+     bb10 (cleanup): {
1016         resume;
- 
-     bb22: {
-         StorageDead(_68);
-         StorageDead(_71);
---
-         StorageDead(_70);
-         goto -> bb23;
-     }
- 
-     bb23: {
-         StorageDead(_60);
-         drop(_29) -> [return: bb24, unwind continue];
- 
-     bb24: {
-         StorageDead(_29);
-         StorageDead(_28);
-         StorageDead(_28);
-         return;
1039     }
1040 }
1041 

thread '[mir-opt] tests/mir-opt/pre-codegen/loops.rs' panicked at src/tools/compiletest/src/runtest.rs:4130:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir


failures:
    [mir-opt] tests/mir-opt/pre-codegen/loops.rs

@bors
Copy link
Contributor

bors commented Jan 20, 2024

☀️ Try build successful - checks-actions
Build commit: 9ef5d52 (9ef5d52bc4d509d88b74d19be0a6da1ae659afea)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9ef5d52): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.7% [0.3%, 18.3%] 49
Regressions ❌
(secondary)
2.6% [0.2%, 9.8%] 37
Improvements ✅
(primary)
-2.2% [-28.2%, -0.5%] 182
Improvements ✅
(secondary)
-2.0% [-5.0%, -0.4%] 174
All ❌✅ (primary) -1.0% [-28.2%, 18.3%] 231

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
9.6% [1.1%, 238.0%] 89
Regressions ❌
(secondary)
9.0% [1.9%, 91.9%] 34
Improvements ✅
(primary)
-4.5% [-5.6%, -2.4%] 3
Improvements ✅
(secondary)
-5.1% [-6.9%, -3.2%] 2
All ❌✅ (primary) 9.1% [-5.6%, 238.0%] 92

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.5% [0.8%, 15.5%] 31
Regressions ❌
(secondary)
4.4% [1.8%, 10.6%] 17
Improvements ✅
(primary)
-2.5% [-29.5%, -0.9%] 87
Improvements ✅
(secondary)
-3.2% [-5.5%, -0.9%] 32
All ❌✅ (primary) -0.6% [-29.5%, 15.5%] 118

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
6.0% [0.4%, 29.0%] 74
Regressions ❌
(secondary)
1.8% [0.4%, 11.6%] 54
Improvements ✅
(primary)
-1.2% [-3.2%, -0.6%] 37
Improvements ✅
(secondary)
-2.5% [-5.8%, -0.4%] 21
All ❌✅ (primary) 3.6% [-3.2%, 29.0%] 111

Bootstrap: 663.584s -> 671.323s (1.17%)
Artifact size: 308.31 MiB -> 313.17 MiB (1.58%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 20, 2024
@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant 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.

7 participants