[PATCH] D134158: [SCEV] Verify contents of loop disposition cache

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 02:47:15 PDT 2022


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:13991
+      auto RecomputedLoopDisposition =
+          getLoopDisposition(S, Loop, /*UseCache*/ false);
+      if (CachedDisposition != RecomputedLoopDisposition) {
----------------
mkazantsev wrote:
> nikic wrote:
> > Why does this not use the usual approach of comparing with the loop disposition on the other ScalarEvolution instance (SE2)?
> I was hesitant about this because SE2 might also have wrong cache state (for same reasons). On other hand we might invalidate it all the time... Let's see if it works.
Ok, if we believe that only transform passes may break this, then it's fine.


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

https://reviews.llvm.org/D134158



More information about the llvm-commits mailing list