Uh oh!
There was an error while loading. Please reload this page.
[mir-opt] Turn on the ConstProp pass by default - #66074
Conversation
wesleywiser
commented
Nov 4, 2019
@bors try |
rust-timer
commented
Nov 4, 2019
Awaiting bors try build completion |
bors
commented
Nov 4, 2019
[experiment] Test ConstProp performance Experiment to see performance implications for turning on ConstProp for scalars. r? @ghost
bors
commented
Nov 4, 2019
☀️ Try build successful - checks-azure |
rust-timer
commented
Nov 4, 2019
Queued 98da694 with parent 0d5264a, future comparison URL. |
rust-timer
commented
Nov 4, 2019
Finished benchmarking try commit 98da694, comparison URL. |
oli-obk
commented
Nov 6, 2019
@rfcbot poll I think we should turn on constant propagation unconditionally (so in release mode and additionally in debug mode) since it reduces the work that llvm has to do quite a bit. Right now there is no real degradation of the debugging experience, since the worst that happens to users is that In the future we may const prop function calls to Constant propagation does not propagate over user defined variables, only expressions (so MIR temporaries) are const propagated. This may change in the future, but we can reopen the debug info degradation question then. |
Team member @oli-obk has asked teams: T-compiler, for consensus on:
|
09d7ce8 to
db23021Compareeddyb
commented
Nov 6, 2019
Note that post-#56231 you don't even need to care about debuginfo or "temp vs var", all you have to do is leave assignments around and run the pass to remove dead locals (which won't remove locals that have debuginfo attached). |
nikomatsakis
commented
Nov 7, 2019
@rfcbot reviewed |
1 similar comment
varkor
commented
Nov 8, 2019
@rfcbot reviewed |
michaelwoerister
commented
Nov 8, 2019
Are the numbers above already with constant propagation turned on for debug builds too? |
@michaelwoerister Yes, the results are with constant propagation turned on for both debug and release builds. |
Uh oh!
There was an error while loading. Please reload this page.
…ovements, r=oli-obk [mir-opt] Handle return place in ConstProp and improve SimplifyLocals pass Temporarily rebased on top of rust-lang#66074. The top 2 commits are new. r? @oli-obk
perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits. `ConstProp` doesn't currently intern the memory used by its `Machine` so we can't yet propagate allocations which is why `ConstProp::should_const_prop()` checks if the value being propagated is a scalar or not.
db23021 to
db5fc10CompareConstProp pass by defaultwesleywiser
commented
Nov 12, 2019
This is ready for a final review. r? @oli-obk |
oli-obk
commented
Nov 12, 2019
@bors r+ |
bors
commented
Nov 12, 2019
📌 Commit db5fc10 has been approved by |
…oli-obk [mir-opt] Turn on the `ConstProp` pass by default perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits.
Rollup of 13 pull requests Successful merges: - #65932 (download .tar.xz if python3 is used) - #66074 ([mir-opt] Turn on the `ConstProp` pass by default) - #66094 (Fix documentation for `Iterator::count()`.) - #66166 (rename cfg(rustdoc) into cfg(doc)) - #66227 (docs: Fix link to BufWriter::flush) - #66292 (add Result::map_or) - #66297 (Add a callback that allows compiler consumers to override queries.) - #66317 (Use a relative bindir for rustdoc to find rustc) - #66330 (Improve non-exhaustiveness handling in usefulness checking) - #66331 (Add some tests for fixed ICEs) - #66334 (Move Session fields to CrateStore) - #66335 (Move self-profile infrastructure to data structures) - #66337 (Remove dead code for encoding/decoding lint IDs) Failed merges: r? @ghost
…oli-obk [mir-opt] Turn on the `ConstProp` pass by default perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits.
Centril
commented
Nov 13, 2019
@bors rollup=never |
wesleywiser
commented
Nov 13, 2019
joelpalmer
commented
Nov 18, 2019
Ping from Triage: Hi @wesleywiser I see #66342 was closed yesterday. Please update this PR when you have a chance. Thanks! |
wesleywiser
commented
Nov 19, 2019
@bors r=oli-obk |
bors
commented
Nov 19, 2019
📌 Commit db5fc10 has been approved by |
bors
commented
Nov 19, 2019
[mir-opt] Turn on the `ConstProp` pass by default perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits.
bors
commented
Nov 19, 2019
☀️ Test successful - checks-azure |
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
Rustup to rustc 1.41.0-nightly (35ef33a 2019-11-21) I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by messense/rustc-test#3 List of rustups: - rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0) - rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`) - rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types) - rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default) changelog: none
perf.rlo shows that running the
ConstProppass results inacross-the-board wins regardless of debug or opt complilation mode. As a
result, we're turning it on to get the compile time benefits.