-
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
MIR optimization tracking issue. #44285
Comments
Is that a normalization concern? The MIR that enters borrowck etc. needs to have Second, if we're chasing normalization, the CFG changes made by |
I'm not sure why complicated operands in function calls are worse than complicated operands in |
I'd expect that to be
Yeah, I'm leaning in that direction myself, we'll see how clean I can make it. |
Nope. I think that keeping an unnormalized |
@arielb1 I mean that if |
[MIR] Restrict ProjectionElem::Index and Storage{Live,Dead} to Local. (see #44285) r? @nikomatsakis
Seems like there is more interest this year about MIR optimisations in general, so pinging WG here. Cc @rust-lang/wg-codegen |
Triage: still a lot of interest, no movement yet that I'm aware of. |
we now have the @rust-lang/wg-mir-opt working group. @spastorino is currently remodelling |
Discussed in the "backlog bonanza" in this week's compiler team triage meeting. While the info contained in this issue is useful, most of the MIR opt work in the last two years has been happening elsewhere and it's not clear what this is actually tracking. We are therefore closing this issue. |
As all efforts have more stalled, I'll use this to note down some ideas (cc @rust-lang/compiler):
rustc_mir::expand
: take a MIR fragment (e.g. an intrinsic call) and lazily emit another MIR fragment which is the equivalent expansionrustc_mir::reduce
: generalized dataflow toolkit for writing localized transformations which must cause dataflow information to converge, and thus can be run until fixpointexpand
but instead of (just) emitting a MIR fragment, a few blessed mutations (somewhat like @arielb1's patch tools) could be allowed, which are interpreted by the dataflow toolkit with minimal recomputationuseLocal
instead ofOperand
for index projections, so thatLvalue
stops being a treeuseLocal
instead ofLvalue
inStorage{Live,Dead}
[u8; 8]
/u64
forO(1)
dataflow lookup or even on-the-fly SROAsplitOperand::Consume
into copies and moves, the latter invalidating all borrowsRvalue::Aggregate
in favor of field assignment andSetDiscriminant
SetDiscriminant(0)
on non-enums can be pruned after borrowck runsmir::Place
should not be a recursive datastructure (https://paper.dropbox.com/doc/Place-2.0-current-PR-status--AYpEHnZVlMVhug5z7XDxiqgbAg-vmbnFv8VkCEuL57QfWWMH)Deref
not a place projection (https://paper.dropbox.com/doc/Place-2.0--AYrQzvo5k2eL2v57XD__sDrZAg-9NjhX4N9I3dEt6YCJM8Ln)Index
not a place projection (https://paper.dropbox.com/doc/Place-2.0--AYrQzvo5k2eL2v57XD__sDrZAg-9NjhX4N9I3dEt6YCJM8Ln)The text was updated successfully, but these errors were encountered: