Skip to content

Propagate from borrowed locals in CopyProp #143624

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

Merged
merged 1 commit into from
Jul 12, 2025

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Jul 8, 2025

r? cjgillot

@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 Jul 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@tmiasko
Copy link
Contributor Author

tmiasko commented Jul 8, 2025

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jul 8, 2025
Propagate from borrowed locals in CopyProp

r? cjgillot
@rust-bors
Copy link

rust-bors bot commented Jul 8, 2025

⌛ Trying commit dd34b79 with merge 1e4b0b7

To cancel the try build, run the command @bors2 try cancel.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 8, 2025
@rust-bors
Copy link

rust-bors bot commented Jul 8, 2025

☀️ Try build successful (CI)
Build commit: 1e4b0b7 (1e4b0b7e6afa40bec58198f6cdb7d7bbfdf3efd0, parent: 688ea65df6a47866d0f72a00f1e18b47a7edf83b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1e4b0b7): 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.

mean range count
Regressions ❌
(primary)
0.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 18
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.0%] 26
All ❌✅ (primary) -0.1% [-0.3%, 0.4%] 19

Max RSS (memory usage)

Results (primary 1.9%, secondary 2.2%)

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

mean range count
Regressions ❌
(primary)
5.5% [5.5%, 5.5%] 1
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.9% [-1.7%, 5.5%] 2

Cycles

Results (primary 2.4%, secondary -3.9%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-5.7%, -2.8%] 3
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (primary 0.1%, secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
0.3% [0.0%, 1.3%] 11
Regressions ❌
(secondary)
0.1% [0.0%, 0.3%] 6
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 20
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.0%] 8
All ❌✅ (primary) 0.1% [-0.4%, 1.3%] 31

Bootstrap: 465.817s -> 464.2s (-0.35%)
Artifact size: 372.34 MiB -> 372.35 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 8, 2025
// We must not unify two locals that are borrowed. But this is fine if one is borrowed and
// the other is not. This bitset is keyed by *class head* and contains whether any member of
// the class is borrowed.
// We can propagate from a borrowed local into other locals that aren't borrowed, since we know
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate why we must not propagate if the lhs is borrowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expanded the comment a little bit, let me know if this is what you had in mind.

@tmiasko tmiasko force-pushed the copy-prop-borrowed branch from dd34b79 to 3a16e0a Compare July 10, 2025 07:31
@tmiasko tmiasko force-pushed the copy-prop-borrowed branch from 3a16e0a to 9681786 Compare July 10, 2025 07:36
@cjgillot
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Jul 12, 2025

📌 Commit 9681786 has been approved by cjgillot

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 12, 2025
@bors
Copy link
Collaborator

bors commented Jul 12, 2025

⌛ Testing commit 9681786 with merge bfc046a...

@bors
Copy link
Collaborator

bors commented Jul 12, 2025

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing bfc046a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 12, 2025
@bors bors merged commit bfc046a into rust-lang:master Jul 12, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 12, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 915e535 (parent) -> bfc046a (this PR)

Test differences

Show 3 test diffs

3 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard bfc046a4b8d6b57db02540182466e989a9b0fb40 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. tidy: 100.7s -> 75.8s (-24.7%)
  2. aarch64-apple: 4978.9s -> 3776.1s (-24.2%)
  3. x86_64-apple-2: 3910.5s -> 3030.3s (-22.5%)
  4. x86_64-apple-1: 7098.6s -> 5811.1s (-18.1%)
  5. pr-check-2: 2633.7s -> 2175.1s (-17.4%)
  6. x86_64-rust-for-linux: 2955.6s -> 2540.8s (-14.0%)
  7. pr-check-1: 1748.8s -> 1513.1s (-13.5%)
  8. i686-gnu-2: 6195.5s -> 5393.6s (-12.9%)
  9. dist-x86_64-apple: 7334.0s -> 8209.6s (11.9%)
  10. arm-android: 6629.4s -> 5871.1s (-11.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bfc046a): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

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

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-0.2% [-0.6%, -0.1%] 27
Improvements ✅
(secondary)
-0.3% [-1.0%, -0.0%] 33
All ❌✅ (primary) -0.1% [-0.6%, 0.5%] 28

Max RSS (memory usage)

Results (primary 1.8%)

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

mean range count
Regressions ❌
(primary)
6.2% [6.2%, 6.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [-2.6%, 6.2%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (primary 0.1%, secondary -0.1%)

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

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 0.9%] 13
Regressions ❌
(secondary)
0.1% [0.0%, 0.3%] 4
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 15
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.0%] 9
All ❌✅ (primary) 0.1% [-0.4%, 0.9%] 28

Bootstrap: 466.126s -> 464.174s (-0.42%)
Artifact size: 374.63 MiB -> 374.70 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants