-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[WIP] Optimize calls to copy_nonoverlapping
intrinsic to assignment
#81344
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
a528f5f
to
49b2a8b
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 49b2a8b with merge 1cf2e748df357932cdf1d2cc07d6000972bf0397... |
Fixes #73258 and I wonder how many more :) Nice! |
locals: &LocalDecls<'tcx>, | ||
statements: &mut Vec<Statement<'tcx>>, | ||
) { | ||
if let Some((src, dest, next_bb)) = self.find_copy_nonoverlapping(terminator, locals) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: respect optimization fuel
☀️ Try build successful - checks-actions |
Queued 1cf2e748df357932cdf1d2cc07d6000972bf0397 with parent 9a9477f, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (1cf2e748df357932cdf1d2cc07d6000972bf0397): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Many improvements of up to 2.6% with a few small regressions of up to 0.8%. |
@@ -25,6 +28,10 @@ impl<'tcx> MirPass<'tcx> for InstCombine { | |||
_ => {} | |||
} | |||
} | |||
|
|||
if let Some(terminator) = &mut block.terminator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use block.terminator_mut()
. The terminator is always Some
after mir building.
Shouldn't this be a |
cc rust-lang/compiler-team#348 and #77511. |
Oh, I'm sorry! I'd completely forgotten about that MCP. Closing in favor of #77511 |
r? @ghost
Rebased on top of #81238