[PATCH] D91325: [IndVarSimplify] Drop any stored trip count value before IndVarSimplify

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 20:33:15 PST 2020


mkazantsev added a comment.

The strategy we use across the optimizer is to drop cached values in the transform that invalidated them, not before their users (as the users are multiple). Do we know who broke it in this case?



================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1425
+    // ExitCount has been changed.
+    Loop *Parent = L->getParentLoop();
+    bool HasSharedExit = false;
----------------
This whole logic is completely expensive as it visits the exit blocks multiple times. Why not just call `forgetTopmostLoop(L)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91325



More information about the llvm-commits mailing list