Correct and document semantics of yield terminator#156875
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras |
|
|
This comment has been minimized.
This comment has been minimized.
c2fa5ba to
4141c4c
Compare
There was a problem hiding this comment.
I'm afraid I don't know nearly enough about async lowering to review this.
@rustbot reroll
(Or maybe you know a good reviewer?)
|
@rustbot reroll |
|
Reminder, once the PR becomes ready for a review, use |
The only difference I could see in tests is the size of async-drop coroutine state. On the current (wrong) semantics, I got a size increase when trying to change async drop expansion: the resume argument was (wrongly) saved in coroutine state. |
ce3102b to
9ef4f52
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors r=oli-obk |
…uwer Rollup of 12 pull requests Successful merges: - #154591 (Remove `will_cache_on_disk_for_key_fn`) - #156672 (Misc improvements to coroutine transform code) - #157027 (HIR ty lowering: Move some things into submodules) - #157051 (Allow two object files for a single CGU in CompiledModule) - #157100 (Some more per owner things) - #153497 (Use `trait_object_dummy_self` more & heavily fix+update related docs) - #155638 (Fix tupled closure signature in `AsyncFn` arg mismatch diagnostic) - #156826 (style: Clarify nullary call and `()` no-break rule applies past max width) - #157004 (Remove unused functions in `value_analysis.rs`) - #157032 (Fixed more &x ->&mut x suggestions) - #157033 (Note irrefutable while let in loop type errors) - #157139 (compiler: `ops::RangeInclusive` → `range::RangeInclusive`) Failed merges: - #156875 (Correct and document semantics of `yield` terminator)
This comment has been minimized.
This comment has been minimized.
9ef4f52 to
b542677
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=oli-obk |
…uwer Rollup of 8 pull requests Successful merges: - #156863 (Make hint::cold_path #[cold] so that it works even if the MIR inliner can't inline it) - #156875 (Correct and document semantics of `yield` terminator) - #157115 ([rustdoc] Fix foreign items macro expansion) - #157150 (Revert "drop derive helpers during ast lowering" ) - #156887 (Rename `-Zdebuginfo-for-profiling` switch) - #157039 (rustdoc: correctly propagate cfgs for glob reexports) - #157125 (Rewrite the `#[repr]` attribute parser) - #157154 (Revert workaround used to select the gcc codegen in the coretests CI)
|
@rust-timer build bb4f119 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (bb4f119): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 6.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 515.367s -> 513.684s (-0.33%) |
|
(thanks Jonathan!) Looks like this PR caused a mild regression in |
View all comments
The current implementation of dataflow for the yield terminator confuses the
droptarget with unwinding. Which is wrong, in particular when implementing async drops.r? @RalfJung