Closed
Description
Tracking issue for transition to MIR (rust-lang/rfcs#1211).
Relevant discuss thread: https://internals.rust-lang.org/t/transitioning-to-mir/2706
Regressions
These are cases where building MIR is causing existing crates to stop working.
- reduce memory usage for match Perf regression in nightly when compiling massive matches #29227
Refactorings
These are places where the design of MIR needs some tweaks. In some cases, the best course of action may be unclear or in active debate.
Other work
- add overflow and division by zero checkingconstant propagation and hoistingport rvalue checkingport dead-code passport reachabilityport match checking to take place during MIR constructionport effect checkingport intrinsicckenable trans universally
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
steveklabnik commentedon Aug 18, 2015
#27893
nikomatsakis commentedon Sep 30, 2015
PR #28748 enables MIR construction unconditionally.
bstrie commentedon Oct 24, 2015
@nikomatsakis I've heard reports that unconditional MIR construction is leading to OOM for certain people. Is MIR construction going to also be enabled for the stable and beta releases? I'd hate for compiler perf to regress for 1.5-stable...
bstrie commentedon Oct 26, 2015
@nikomatsakis Not just memory regression, but perf regression too:
To reiterate my question, is it safe to assume that we won't be turning on MIR construction unconditionally for 1.5-beta, even if we leave it on for 1.6-nightly?
Ryman commentedon Oct 26, 2015
crate/commit in question for the above: nickel-org/nickel.rs@197aac3
rustc:
rustc 1.5.0-nightly (1210fb9bc 2015-10-23)
It's still repro on latest nightly:
rustc 1.5.0-nightly (c3db627cb 2015-10-26)
.Same compiler has <0.2s 'MIR dump' for hyper, so I'm wondering if we're doing something particularly bad within nickel? Seems to bounce around between 4-6seconds.
nikomatsakis commentedon Oct 26, 2015
nikomatsakis commentedon Oct 26, 2015
@Ryman the existing issue had to do with match translation, do you know if you have any match statements that have large sets of constants (or lots and lots of patterns)? For example:
Ryman commentedon Oct 26, 2015
@nikomatsakis Ah, yeah we do, this expands into two decent sized matches. If I extracted that to another crate and re-exported the type I guess we'd lose the hit?
nikomatsakis commentedon Oct 26, 2015
@Ryman well ideally we'll just fix the codegen issue :) I'm not sure if
exporting it to another crate would help, except that you would only do it
once I guess. Anyway, I've just about got a PR that disables MIR on
beta/stable for now.
On Mon, Oct 26, 2015 at 2:57 PM, Ryman notifications@github.com wrote:
nikomatsakis commentedon Oct 26, 2015
@Ryman still that match doesn't quite fit the pattern I was expecting, I'll
have to investigate more deeply.
On Mon, Oct 26, 2015 at 3:07 PM, Nicholas Matsakis nmatsakis@mozilla.com
wrote:
Ryman commentedon Oct 26, 2015
@nikomatsakis it looks like each of the
deriving
s for that enum also result in huge matches against single tuple refs, e.g.(&Foo,) => { .. }
. Would that fit the pattern more?nikomatsakis commentedon Oct 26, 2015
@Ryman I was more thinking of matches against integer literals or other
non-enum types.
On Mon, Oct 26, 2015 at 4:58 PM, Ryman notifications@github.com wrote:
14 remaining items