-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Adapt SROA MIR opt for aggregated MIR #107687
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
) { | ||
if lvalue.as_local().is_some() { | ||
match rvalue { | ||
// Aggregate assignments are expanded in run_pass. |
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.
pre-existing, but what does this comment mean?
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.
// Aggregate assignments are expanded in run_pass. | |
// `replace_flattened_locals` will expand those statements into fields, | |
// so we do not mark the lhs as non-splittable. |
I feel more motivated to try to land some of my unpublished branches for MirPatch improvements, but the PR looks good @bors r+ |
Rollup of 5 pull requests Successful merges: - rust-lang#107553 (Suggest std::ptr::null if literal 0 is given to a raw pointer function argument) - rust-lang#107580 (Recover from lifetimes with default lifetimes in generic args) - rust-lang#107669 (rustdoc: combine duplicate rules in ayu CSS) - rust-lang#107685 (Suggest adding a return type for async functions) - rust-lang#107687 (Adapt SROA MIR opt for aggregated MIR) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The pass was broken by #107267.
This PR extends it to replace:
by assignment between locals
The improved pass runs to fixpoint, so we can flatten nested field accesses.