Uh oh!
There was an error while loading. Please reload this page.
Remove unused set-discriminant statements and assignments regardless of rvalue - #77876
Conversation
tmiasko
commented
Oct 12, 2020
- Represent use counts with u32
- Unify use count visitors
- Change RemoveStatements visitor into a function
- Remove unused set-discriminant statements
- Use exhaustive match to clarify what is being optimized
- Remove unused assignments regardless of rvalue kind
rust-highfive
commented
Oct 12, 2020
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
jonas-schievink
commented
Oct 12, 2020
@bors try @rust-timer queue |
rust-timer
commented
Oct 12, 2020
Awaiting bors try build completion |
bors
commented
Oct 12, 2020
⌛ Trying commit 443181e9a31cf4eb006b786261b932c978940155 with merge 2fc7421b922ca95716a1e8b2863897f8f661d0e0... |
bors
commented
Oct 12, 2020
☀️ Try build successful - checks-actions, checks-azure |
rust-timer
commented
Oct 12, 2020
Queued 2fc7421b922ca95716a1e8b2863897f8f661d0e0 with parent 8dae8cd, future comparison URL. |
rust-timer
commented
Oct 13, 2020
Finished benchmarking try commit (2fc7421b922ca95716a1e8b2863897f8f661d0e0): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
0a63cff to
7f17305Comparetmiasko
commented
Oct 22, 2020
r? @wesleywiser |
Uh oh!
There was an error while loading. Please reload this page.
wesleywiser
left a comment
There was a problem hiding this comment.
This looks great and I'm glad to see tests covering the new behavior!
wesleywiser
commented
Oct 26, 2020
@bors r+ |
bors
commented
Oct 26, 2020
📌 Commit 89314a4e92e4e675c10ea6db9ca3914af5a81f26 has been approved by |
bors
commented
Oct 26, 2020
⌛ Testing commit 89314a4e92e4e675c10ea6db9ca3914af5a81f26 with merge 3cff5cc956b22a8c0f810cd9009c29c0ece46e9c... |
bors
commented
Oct 26, 2020
💔 Test failed - checks-actions |
The simplify locals implementation uses two different visitors to update the locals use counts. The DeclMarker calculates the initial use counts. The StatementDeclMarker updates the use counts as statements are being removed from the block. Replace them with a single visitor that can operate in either mode, ensuring consistency of behaviour. Additionally use exhaustive match to clarify what is being optimized. No functional changes intended.
No functionl changes intended.
Update affected ui & incremental tests to use a user declared variable bindings instead of temporaries. The former are preserved because of debuginfo, the latter are not.
tmiasko
commented
Oct 26, 2020
Added overflow-checks=off to the test and updated the output. |
wesleywiser
commented
Oct 26, 2020
@bors r+ |
bors
commented
Oct 26, 2020
📌 Commit 4c3e06a has been approved by |
bors
commented
Oct 26, 2020
bors
commented
Oct 27, 2020
☀️ Test successful - checks-actions |
Mark-Simulacrum
commented
Oct 27, 2020
Performance results, as expected, are an improvement on the ctfe stress test. That said, there does appear to be a regression on the cranelift codegen benchmark in LLVM -- perhaps these weren't quite unused? Any thoughts here? |
Those changes are completely boring from LLVM perspective. They remove dead code and affect size estimates accordingly. They might change the unit partitioning as a side effect. Testing locally, I do have a different unit partitioning for full builds of cranelift-codegen. I see no reason to consider this to be anything different from codegen partitioning noise. |
Mark-Simulacrum
commented
Oct 27, 2020
Ah, ok. Makes sense. Thanks for investigating! |