Label overwritten for never read assignments#154456
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Let's check whether performance changed, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ts, r=<try> Label overwritten assignments for never read assignments
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (eaf85f7): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 3.6%, secondary 1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 3.0%, secondary 2.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 484.633s -> 485.683s (0.22%) |
| = help: maybe it is overwritten before being read? | ||
| | ^ this value is reassigned later and never used | ||
| LL | b += 1; | ||
| | ------ `b` is overwritten here before the previous value is read |
There was a problem hiding this comment.
label on this seems weird, it's a separate issue(#154457), I will work on it with following up PR.
performance seems trivial enough. |
d4ec5d6 to
5e0ff58
Compare
This comment has been minimized.
This comment has been minimized.
| warning: value assigned to `d` is never read | ||
| --> $DIR/overwritten-before-read-note-issue-154434.rs:5:17 | ||
| | | ||
| LL | let mut d = String::from("hello"); | ||
| | ^^^^^^^^^^^^^^^^^^^^^ this value is reassigned later and never used | ||
| LL | d = String::from("ahoy"); | ||
| | - `d` is overwritten here before the previous value is read | ||
| | | ||
| = note: requested on the command line with `-W unused-assignments` |
There was a problem hiding this comment.
Do we need the additional test given the existing ones?
There was a problem hiding this comment.
yes, seems it's unnecessary, I will remove it in follow-up PR.
|
@bors r+ |
|
@bors p=6 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors try jobs=x86_64-gnu-llvm-21-3 |
This comment has been minimized.
This comment has been minimized.
…ts, r=<try> Label overwritten for never read assignments try-job: x86_64-gnu-llvm-21-3
|
💔 Test for 4e89344 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
087e26f to
413f0f0
Compare
|
@bors try jobs=x86_64-gnu-llvm-21-3 |
This comment has been minimized.
This comment has been minimized.
…ts, r=<try> Label overwritten for never read assignments try-job: x86_64-gnu-llvm-21-3
|
💔 Test for 05b552e failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
413f0f0 to
ebf22f8
Compare
|
@bors try jobs=x86_64-gnu-llvm-21-3 |
This comment has been minimized.
This comment has been minimized.
…ts, r=<try> Label overwritten for never read assignments try-job: x86_64-gnu-llvm-21-3
|
@bors r=estebank p=0 |
This comment has been minimized.
This comment has been minimized.
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 700cfa8 (parent) -> 12ab1cf (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 12ab1cf1fd3dc925a846b0eb8a4b39393140fdd3 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (12ab1cf): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -0.5%, secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.8%, secondary 2.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 484.273s -> 482.203s (-0.43%) |
View all comments
Fixes #154434
Closes #144079