[PATCH] D134614: [SCEV] Support clearing Block/LoopDispositions for a single value.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 05:02:17 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8400
+  // Invalidate the block and loop dispositions cached for S. Loop dispositions of S's users may change if S's disposition changes (i.e. a user may change to loop-invariant, if S changes to loop invariant), so also invalidate loop dispositions of S's users recursively.
+  BlockDispositions.erase(S);
+
----------------
nikic wrote:
> I don't really get why loop and block dispositions get different handling here. Aren't block dispositions computed in essentially the same recursive way?
You are right, my initial thinking only considered dominance between the changed expression and the SCEV users, but not considered that the cache relates SCEV expressions to arbitrary blocks. Updated!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134614



More information about the llvm-commits mailing list