Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNo MIR optimisations with no-trans #41423
Comments
eddyb
added
the
T-compiler
label
Apr 20, 2017
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/compiler Should we do this? Not by treating MIR optimizations as part of "trans" but by not optimizing the MIR that doesn't end up in the crate metadata. |
eddyb
added
the
I-nominated
label
Apr 21, 2017
This comment has been minimized.
This comment has been minimized.
|
@eddyb I would think that we want the optimized MIR in the metadata, since if we have to inline across crates, we don't want to optimize again, right? |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis Right, but we only put MIR in the metadata if it's needed across crates. |
This comment has been minimized.
This comment has been minimized.
|
Two points. I believe I feel like this is one of the things that could be automatically solved as we make more stuff on-demand. |
nikomatsakis
removed
the
I-nominated
label
Apr 27, 2017
This comment has been minimized.
This comment has been minimized.
|
On-demand compilation could significantly change the story here. Let's wait for it. |
This comment has been minimized.
This comment has been minimized.
|
triage: P-low We are still working out the story around mir optimizations and the query system. Once that is more sorted, we can revisit this question. We're barely doing any MIR optimization now anyhow. |
rust-highfive
added
the
P-low
label
Apr 27, 2017
Mark-Simulacrum
added
C-enhancement
I-compiletime
labels
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
Triage: no changes that I'm aware of |
leonardo-m commentedApr 20, 2017
This is an enhancement request. When I compile the code with "-Z no-trans" to just verify the types and perform the borrow checking, I have seen with "-Ztime-passes" that it also performs (on my code, a large single file module):
time: 0.127; rss: 177MB MIR optimisationsIs it possible and a good idea for "-Z no-trans" to remove this part too? The gain is not a lot (about 0.13 seconds on about 3.5 seconds) but if this optimization is simple to implement, I think it's worth it, because I'm using no-trans often enough to test the code.