[WIP] Optimize calls to copy_nonoverlapping intrinsic to assignment #81344
[WIP] Optimize calls to copy_nonoverlapping intrinsic to assignment #81344wesleywiser wants to merge 2 commits intorust-lang:masterfrom
copy_nonoverlapping intrinsic to assignment #81344Conversation
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.
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%. |
| } | ||
| } | ||
|
|
||
| if let Some(terminator) = &mut block.terminator { |
There was a problem hiding this comment.
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