[PATCH] D120033: [SCEV] Fully invalidate SCEVUnknown on RAUW

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 03:58:23 PST 2022


nikic added a comment.

In D120033#3344649 <https://reviews.llvm.org/D120033#3344649>, @mkazantsev wrote:

> When something is already erased from uniqueSCEVs, but is still in use, I'm pretty sure `verify()` should break somewhere on this situation. Is this something that is happening in reality?

I just checked that this patch does fix eliminate-max.ll with D119488 <https://reviews.llvm.org/D119488>, so clearly this does happen, and we do need to invalidate here. I think the reason why this is not more problematic in practice is that SCEVCallbackVH will perform a use-def walk on RAUW and remove values from the value map, so we end up mostly doing the invalidation through that mechanism. But of course, this is not quite the same, as the SCEV may be part of structures other than the value map etc.


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

https://reviews.llvm.org/D120033



More information about the llvm-commits mailing list