[PATCH] D110390: [SCEV] Establish control over disposition caches

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 28 07:40:06 PDT 2021


mkazantsev added a comment.

In D110390#3025543 <https://reviews.llvm.org/D110390#3025543>, @nikic wrote:

> I'd like to see some analysis of what is actually wrong in the affected test cases. We do already invalidate dispositions in forgetValue() and forgetLoop(), and I'd like to have an understanding of why the current invalidation is insufficient. Sure, invalidating *everything* will certainly fix the problem, but I don't think that's how we want to do things if it can be avoided.

Neither forgetValue nor forgetLoop drops BlockDisposition cache. We literally don't have a method to drop it surgically (like the one we have for Loop Disposition). And we have some cache which never gets invalidated, things go wrong eventually.

In D110385 <https://reviews.llvm.org/D110385>, I simply added validation of this cache and it started stepping over dangling pointers in LCSSA and LoopFusion pass. They look to not be the only sources in the problem, because we never ever tried to keep this cache in legal state.

I think when thigs are *that* broken, "what is actually wrong" doesn't matter, because cache that is never verified and never indalidated is just broken, unless opposite is proven.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110390/new/

https://reviews.llvm.org/D110390



More information about the llvm-commits mailing list