Uh oh!
There was an error while loading. Please reload this page.
Fix the invalidation of the MIR early exit cache - #35751
Conversation
eddyb
commented
Aug 17, 2016
I'm not seeing any invalidation at all for |
nagisa
commented
Aug 17, 2016
eddyb
commented
Aug 17, 2016
@nagisa Oops, I see. I would've expected |
arielb1
commented
Aug 17, 2016
@bors r+ |
bors
commented
Aug 17, 2016
📌 Commit e1749af has been approved by |
arielb1
commented
Aug 17, 2016
I would prefer to keep the cache through. |
85c4e5d to
44955c7Comparenagisa
commented
Aug 17, 2016
Cache invalidation fixed. |
There was a problem hiding this comment.
This will invalidate the unwind cache in cases other than DropKind::Value, which is undesirable (as StorageDead doesn't end up on the unwind path at all).
112a3e1 to
9983aefCompare9983aef to
2d36642Compareeddyb
commented
Aug 17, 2016
@bors r+ |
bors
commented
Aug 17, 2016
📌 Commit 2d36642 has been approved by |
| if scope.extent == extent { | ||
| let this_scope = scope.extent == extent; | ||
| // We must invalidate all the caches leading up to the scope we’re looking for, because | ||
| // the cached blocks will branch into build of scope not containing the new drop. If we |
There was a problem hiding this comment.
I have a hard time following this comment, I'm afraid. Ideal would be a diagram, but maybe we can just tweak the wording...I don't quite know how since I don't understand it yet :)
There was a problem hiding this comment.
I’ll try to draw something up.
e08d0cd to
2c3250aCompareeddyb
commented
Aug 17, 2016
@bors r+ |
bors
commented
Aug 17, 2016
📌 Commit 2c3250a has been approved by |
Fix the invalidation of the MIR early exit cache ~~The rust-lang#34307 introduced a cache for early exits in order to help with O(n*m) explosion of cleanup blocks but the cache is invalidated incorrectly and I can’t seem to figure out why (caching is hard!)~~ ~~Remove the cache for now to fix the immediate correctness issue and worry about the performance later.~~ Cache invalidation got fixed. Fixesrust-lang#35737 r? @nikomatsakis
nikomatsakis
commented
Aug 18, 2016
Accepting for beta: this was a serious correctness regression. |
The #34307 introduced a cache for early exits in order to help with O(n*m) explosion of cleanup blocks but the cache is invalidated incorrectly and I can’t seem to figure out why (caching is hard!)Remove the cache for now to fix the immediate correctness issue and worry about the performance later.Cache invalidation got fixed.
Fixes#35737
r? @nikomatsakis