Skip to content
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

Always run tail_expr_drop_order lint in promoted MIR query #134493

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

compiler-errors
Copy link
Member

Rather than running the lint at the beginning of mir_drops_elaborated_and_const_checked, run it at the end of mir_promoted. This should ensure that the lint gets picked up when running cargo fix, which runs with --emit metadata and therefore doesn't actually query mir_drops_elaborated_and_const_checked.

We could probably push this down into mir_built too? but I don't really see a good reason to do so.

#132861 (comment)

cc @ehuss

@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2024

r? @cjgillot

rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Dec 19, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@@ -2,7 +2,6 @@
// This lint is to capture potential change in program semantics
// due to implementation of RFC 3606 <https://github.com/rust-lang/rfcs/pull/3606>
//@ edition: 2021
//@ build-fail
Copy link
Member Author

Choose a reason for hiding this comment

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

A build-fail became a check-fail, which is evidence enough of this being a sufficient fix.

@@ -2,5 +2,7 @@
//~| ERROR E0452
//~| ERROR E0452
//~| ERROR E0452
//~| ERROR E0452
Copy link
Member Author

Choose a reason for hiding this comment

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

Duplicated attr errors is due to a call to lints_that_dont_need_to_run in check-builds. This is deduplicated to the user, so it doesn't matter.

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 19, 2024
@compiler-errors compiler-errors changed the title Always run tail_expr_drop_order lint on promoted MIR Always run tail_expr_drop_order lint in promoted MIR query Dec 19, 2024
@lqd
Copy link
Member

lqd commented Dec 19, 2024

bors doesn’t seem to like a couple of errs PRs smh

@bors ping

@bors
Copy link
Contributor

bors commented Dec 19, 2024

😪 I'm awake I'm awake

@lqd
Copy link
Member

lqd commented Dec 19, 2024

@bors try

@oli-obk oli-obk assigned oli-obk and unassigned cjgillot Dec 19, 2024
@lqd
Copy link
Member

lqd commented Dec 19, 2024

Reopening to try and fix bors

@lqd lqd closed this Dec 19, 2024
@lqd lqd reopened this Dec 19, 2024
@lqd
Copy link
Member

lqd commented Dec 19, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 19, 2024

@bors try

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 19, 2024

Homu probably got wind of our attempts to get rid of him and is protesting.

@Kobzol Kobzol closed this Dec 19, 2024
@Kobzol Kobzol reopened this Dec 19, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Dec 19, 2024

@bors try

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b58df10): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking 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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.6%, 2.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.6%, secondary -3.1%)

This 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.

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

Cycles

Results (secondary 2.2%)

This 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.

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

Binary size

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

Bootstrap: 767.394s -> 767.368s (-0.00%)
Artifact size: 330.38 MiB -> 330.94 MiB (0.17%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 19, 2024
@compiler-errors
Copy link
Member Author

I don't believe this is significant enough to warrant a fix.

@compiler-errors
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Dec 19, 2024

📌 Commit 8ccdd12 has been approved by oli-obk

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 19, 2024
@traviscross traviscross added the L-tail_expr_drop_order Lint: tail_expr_drop_order label Dec 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 21, 2024
…oli-obk

Always run `tail_expr_drop_order` lint in promoted MIR query

Rather than running the lint at the beginning of `mir_drops_elaborated_and_const_checked`, run it at the end of `mir_promoted`.  This should ensure that the lint gets picked up when running `cargo fix`, which runs with `--emit metadata` and therefore doesn't actually query `mir_drops_elaborated_and_const_checked`.

We could probably push this down into `mir_built` too? but I don't really see a good reason to do so.

rust-lang#132861 (comment)

cc `@ehuss`
@bors
Copy link
Contributor

bors commented Dec 21, 2024

⌛ Testing commit 8ccdd12 with merge e801bfe...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 21, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 21, 2024
@compiler-errors
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Dec 23, 2024

📌 Commit b893221 has been approved by oli-obk

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 Dec 23, 2024
@bors
Copy link
Contributor

bors commented Dec 23, 2024

⌛ Testing commit b893221 with merge 65fe42a...

@bors
Copy link
Contributor

bors commented Dec 24, 2024

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 65fe42a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 24, 2024
@bors bors merged commit 65fe42a into rust-lang:master Dec 24, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 24, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (65fe42a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -2.3%, secondary -1.8%)

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [3.7%, 3.7%] 1
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-2.9% [-3.7%, -2.1%] 5
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Cycles

Results (secondary -2.5%)

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 763.421s -> 763.437s (0.00%)
Artifact size: 330.54 MiB -> 330.62 MiB (0.02%)

@rustbot rustbot removed the perf-regression Performance regression. label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-tail_expr_drop_order Lint: tail_expr_drop_order 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.