-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MIR optimization tracking issue. #44285
Copy link
Copy link
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-mir-optArea: MIR optimizationsArea: MIR optimizationsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.metabugIssues about issues themselves ("bugs about bugs")Issues about issues themselves ("bugs about bugs")
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-mir-optArea: MIR optimizationsArea: MIR optimizationsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.metabugIssues about issues themselves ("bugs about bugs")Issues about issues themselves ("bugs about bugs")
Type
Fields
Give feedbackNo fields configured for issues without a type.
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 fixpointexpandbut 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 recomputationuseLocalinstead ofOperandfor index projections, so thatLvaluestops being a treeuseLocalinstead ofLvalueinStorage{Live,Dead}[u8; 8]/u64forO(1)dataflow lookup or even on-the-fly SROAsplitOperand::Consumeinto copies and moves, the latter invalidating all borrowsRvalue::Aggregatein favor of field assignment andSetDiscriminantSetDiscriminant(0)on non-enums can be pruned after borrowck runsmir::Placeshould not be a recursive datastructure (https://paper.dropbox.com/doc/Place-2.0-current-PR-status--AYpEHnZVlMVhug5z7XDxiqgbAg-vmbnFv8VkCEuL57QfWWMH)Derefnot a place projection (https://paper.dropbox.com/doc/Place-2.0--AYrQzvo5k2eL2v57XD__sDrZAg-9NjhX4N9I3dEt6YCJM8Ln)Indexnot a place projection (https://paper.dropbox.com/doc/Place-2.0--AYrQzvo5k2eL2v57XD__sDrZAg-9NjhX4N9I3dEt6YCJM8Ln)