-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Do not consider &mut *x
as mutating x
in CopyProp
#108178
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
Nobody got assigned automatically 🤔 should someone be? |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 69a2d71e17b2821a445730d2360331e38229af2e with merge 0e92e4b96312299b07d11647a466dc737e5207c3... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
FYI this perf run does not include #105274 which might be relevant. |
Finished benchmarking commit (0e92e4b96312299b07d11647a466dc737e5207c3): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Now that #105274 is merged. |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 69a2d71e17b2821a445730d2360331e38229af2e with merge 2894f9ae226ad439e75cb76ad98f6811eb326247... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (2894f9ae226ad439e75cb76ad98f6811eb326247): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking 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 @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
r? compiler |
be237cc
to
8dc4dbb
Compare
Does |
This patch handles both cases by considering that a mutation of '*x' is not a mutation of 'x'. |
@RalfJung - Does this change have any stacked borrows implications? @bors r? @JakobDegen |
Failed to set assignee to
|
I took a quick look over the PR, and it seems reasonable to me, but I'd rather someone who knows this code better sign off. |
That's hard to say without reverse engineering CopyProp. @cjgillot could you describe with some examples which new transformations this entails? Stacked Borrows currently does consider |
Basically, this allows to transform
Into
This would be allowed whatever the type of If we consider |
Yeah, I feel pretty strongly that we need to allow this opt. The scenario in which it risks being wrong is if the |
☀️ Test successful - checks-actions |
Finished benchmarking commit (66a2d62): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
The regression in opt builds comes from LLVM doing more work, which is expected. The regression for |
Implicit retags on assignments specifically. I agree we shouldn't have those. Retags on |
This PR removes an unfortunate overly cautious case from the current implementation.
Found by #105274 cc @saethlin