[PATCH] D111602: [SCEV][NFC] Tackle quadratic CT consumption when forgetting memoized results

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 19:51:12 PDT 2021


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:7497
       // count for loop0 and getBackedgeTakenInfo(loop0) will clear out the trip
       // count for loop1, effectively nullifying SCEV's trip count cache.
       for (auto *U : I->users())
----------------
nikic wrote:
> Just wondering, does the problem described in this comment affect the new invalidation mechanism?
If I'm reading this correctly, the new mechanism will drop trip count cache. The notion that we can sometimes forget something not for correctness purposes, but for the sole purpose of getting better results, is interesting. If it doesn't lead to any dangling pointers or directly wrong cached results, maybe we should consider non-recursive invalidation here.



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

https://reviews.llvm.org/D111602



More information about the llvm-commits mailing list