[PATCH] D29395: [ValueTracking] avoid crashing from bad assumptions (PR31809)
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 08:42:23 PST 2017
hfinkel added inline comments.
Comment at: llvm/trunk/lib/Analysis/ValueTracking.cpp:800-803
+ // FIXME: Implement a stronger version of "I give up" by invalidating/clearing
+ // the assumption cache. This should indicate that the cache is corrupted so
+ // future callers will not waste time repopulating it with faulty assumptions.
> davide wrote:
> > Have you looked into how hard it would be to implement this invalidation? Also, why is that a stronger version? (i.e. there are cases where this actually matters or you're just speculating?)
> > Also, clearing the whole assumption cache is really what we want? I mean, what if there are other informations that are not inconsistent and we want to use them anyway?
> In other words, I'm not entirely sure we should add this `FIXME`.
I agree. This is a rare case and I don't think we need to make the infrastructure more complicated than necessary to handle it. Plus, it is a useful invariant that all of the assumptions are in the cache.
More information about the llvm-commits