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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 10:39:35 PST 2022


nikic added a comment.

In D120033#3329890 <https://reviews.llvm.org/D120033#3329890>, @reames wrote:

> I don't think is quite right.  We can have SCEV forget all of it's memoized results, but we can't disallow a client hanging onto an expression containing a SCEVUnknown over a RAUW.  Given that, I think we need to explicitly forget, but keep the bit about changing the value pointer to the new value.

This is making the behavior the same as for erasing the value, so clients already need to deal with SCEVUnknown holding onto a nullptr (if they both cache it and inspect it that deeply).

Though I don't mind keeping the `setValPtr(New)`, that seems harmless.


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

https://reviews.llvm.org/D120033



More information about the llvm-commits mailing list