[PATCH] D111495: [IndVars] Invalidate SCEV when IR is changed in rewriteLoopExitValue.

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 04:46:45 PDT 2021


mkazantsev added a comment.

In D111495#3055252 <https://reviews.llvm.org/D111495#3055252>, @reames wrote:

> In D111495#3055151 <https://reviews.llvm.org/D111495#3055151>, @mkazantsev wrote:
>
>> The very fact that invalidation or non-invalidation in SCEV changes behavior (even if the transforms are correct) is worrysome. It introduces more non-determinism in our compilations...
>
> Yeah, but also widespread unfortunately.  Whenever we have a case where an analysis is not precise or we have two equally precise states, we have that problem.  We don't really have a great way to address this in general.

This may be misleading when we make a change in SCEV and think that it really makes difference, when the only thing it does is caches differently. :(

As for the patch, I'm also fine with that. I don't have strong opinion whether we really want 2nd forget if we know for sure that the results with and without it are both functionally correct. Might be nice to have it anyways just for the sole purpose of consevatism. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111495



More information about the llvm-commits mailing list