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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 02:45:32 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8395
+
+  const SCEV *S =getExistingSCEV(V);
+  if (!S)
----------------
nit: Space after `=`


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8399
+
+  // 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);
----------------
nit: Line length


================
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);
+
----------------
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?


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