-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
End locals' live range before suspending coroutine #118797
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
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 10, 2023
davidtwco
approved these changes
Dec 11, 2023
@bors r+ |
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 11, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 11, 2023
End locals' live range before suspending coroutine State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return. Fixes rust-lang#117733
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 11, 2023
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#118647 (dump bootstrap shims) - rust-lang#118708 (tests: add sanity-check assembly test for every target) - rust-lang#118797 (End locals' live range before suspending coroutine) - rust-lang#118818 (llvm-wrapper: adapt for LLVM API change) - rust-lang#118826 (Edit target doc template to remove email) - rust-lang#118827 (Update table for linker-plugin-lto docs) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Dec 11, 2023
This comment has been minimized.
This comment has been minimized.
State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return.
The special case is subsumed by the check for always live locals that follows it.
@bors r=davidtwco |
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 11, 2023
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Dec 12, 2023
End locals' live range before suspending coroutine State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return. Fixes rust-lang#117733
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2023
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#118445 (Let `reuse` look inside git submodules) - rust-lang#118534 (codegen: panic when trying to compute size/align of extern type) - rust-lang#118756 (use bold magenta instead of bold white for highlighting) - rust-lang#118797 (End locals' live range before suspending coroutine) - rust-lang#118840 (remove some redundant clones) - rust-lang#118844 (Monomorphize args while building Instance body in StableMIR) - rust-lang#118848 (Add myself back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118445 (Let `reuse` look inside git submodules) - rust-lang#118756 (use bold magenta instead of bold white for highlighting) - rust-lang#118797 (End locals' live range before suspending coroutine) - rust-lang#118840 (remove some redundant clones) - rust-lang#118844 (Monomorphize args while building Instance body in StableMIR) - rust-lang#118846 (Fix BinOp `ty()` assertion and `fn_sig()` for closures) - rust-lang#118848 (Add myself back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2023
Rollup merge of rust-lang#118797 - tmiasko:dead-coro, r=davidtwco End locals' live range before suspending coroutine State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return. Fixes rust-lang#117733
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
State transforms retains storage statements for locals that are not
stored inside a coroutine. It ensures those locals are live when
resuming by inserting StorageLive as appropriate. It forgot to end the
storage of those locals when suspending, which is fixed here.
While the end of live range is implicit when executing return, it is
nevertheless useful for inliner which would otherwise extend the live
range beyond return.
Fixes #117733