-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Elaborate all box dereferences in ElaborateBoxDerefs
#100034
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? @oli-obk to go with the other PR. |
☔ The latest upstream changes (presumably #100089) made this pull request unmergeable. Please resolve the merge conflicts. |
9612eb9
to
14d79f2
Compare
A resume place is evaluated and assigned to only after a yield terminator resumes. Ensure that locals used when evaluating the resume place are live across the yield.
14d79f2
to
31fae68
Compare
match DefUse::for_place(*place, context) { | ||
Some(DefUse::Def) => self.0.kill(place.local), | ||
Some(DefUse::Use) => self.0.gen(place.local), | ||
None => {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's now 3 duplications of this logic, maybe give it a helper function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice work!
r=me with nit addressed
so that it is the only pass responsible for elaboration, instead of splitting this responsibility between the `StateTransform` and `ElaborateBoxDerefs`.
31fae68
to
4394ea8
Compare
@bors r+ |
…i-obk Elaborate all box dereferences in `ElaborateBoxDerefs` so that it is the only pass responsible for elaboration, instead of splitting this responsibility between the `StateTransform` and `ElaborateBoxDerefs`.
…i-obk Elaborate all box dereferences in `ElaborateBoxDerefs` so that it is the only pass responsible for elaboration, instead of splitting this responsibility between the `StateTransform` and `ElaborateBoxDerefs`.
Rollup of 8 pull requests Successful merges: - rust-lang#99064 (distinguish the method and associated function diagnostic information) - rust-lang#99920 (Custom allocator support in `rustc_serialize`) - rust-lang#100034 ( Elaborate all box dereferences in `ElaborateBoxDerefs`) - rust-lang#100076 (make slice::{split_at,split_at_unchecked} const functions) - rust-lang#100604 (Remove unstable Result::into_ok_or_err) - rust-lang#100933 (Reduce code size of `assert_matches_failed`) - rust-lang#100978 (Handle `Err` in `ast::LitKind::to_token_lit`.) - rust-lang#101010 (rustdoc: remove unused CSS for `.multi-column`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
so that it is the only pass responsible for elaboration, instead of
splitting this responsibility between the
StateTransform
andElaborateBoxDerefs
.