Uh oh!
There was an error while loading. Please reload this page.
move Deaggregate pass to post_borrowck_cleanup - #73656
Conversation
rust-highfive
commented
Jun 23, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
150dab1 to
c350951Comparerust-highfive
commented
Jun 23, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
RalfJung
commented
Jun 23, 2020
Oh so the reference bug also interacts with this? Or is that just to avoid conflicts? |
oli-obk
commented
Jun 23, 2020
just to avoid conflicts, the bugfix changes MIR that this PR also changes. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
c350951 to
37a4567CompareThere was a problem hiding this comment.
@wesleywiser the bug used to be that this (the last assignment to _6 in this MIR) assigned a constant to _6 and didn't erase it at the end of the block.
There was a problem hiding this comment.
causing it to be read here, even though both assignments flow into this block
Uh oh!
There was an error while loading. Please reload this page.
37a4567 to
13529d6Compare
This comment has been minimized.
This comment has been minimized.
…leywiser Const prop: erase all block-only locals at the end of every block I messed up this erasure in rust-lang#73656 (comment). I think it is too fragile to have the previous scheme. Let's benchmark the new scheme and see what happens. r? @wesleywiser cc @felix91gr
13529d6 to
3b5c65dCompareoli-obk
commented
Jul 6, 2020
@wesleywiser this is ready for review again |
Uh oh!
There was an error while loading. Please reload this page.
3b5c65d to
94bcb4eCompare94bcb4e to
2d2049cCompareoli-obk
commented
Jul 14, 2020
ping @wesleywiser I did a rebase as discussed on zulip and it still applies cleanly. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
921c120 to
e15f3e0Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ath, r=wesleywiser Check whether locals are too large instead of whether accesses into them are too large Essentially this stops const prop from attempting to optimize ```rust let mut x = [0_u8; 5000]; x[42] = 3; ``` I don't expect this to be a perf improvement without rust-lang#73656 (which is also where the lack of this PR will be a perf regression). r? @wesleywiser
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e15f3e0 to
307d0d8Compareoli-obk
commented
Aug 11, 2020
@bors r=wesleywiser |
bors
commented
Aug 11, 2020
📌 Commit 307d0d8 has been approved by |
bors
commented
Aug 11, 2020
bors
commented
Aug 11, 2020
☀️ Test successful - checks-actions, checks-azure |
ecstatic-morse
commented
Aug 17, 2020
This resulted in small regression to instruction counts on |
Reopen of #71946
Only the second commit is from this PR, the other commit is a bugfix that's in the process of getting merged. I'll rebase once that's done
In #70073 MIR pass handling got reorganized, but with the goal of not changing behavior (except for disabling some optimizations on opt-level = 0). But there we realized that the Deaggregator pass, while conceptually more of a "cleanup" pass (and one that should be run before optimizations), was run in the middle of the optimization chain. Likely this is an accident of history, so I suggest we try and clean that up by making it a proper cleanup pass.
This does change mir-opt output, because deaggregation now runs before const-prop instead of after.
r? @wesleywiser @rust-lang/wg-mir-opt
cc @RalfJung