[PATCH] D149251: [SCEV] Don't expect BackedgeTakenCounts cache to contain an entry for loop in getBackedgeTakenInfo

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 04:33:48 PDT 2023


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8353
 
+void ScalarEvolution::updateBackedgeTakenCountUsers(
+    const Loop *L, const BackedgeTakenInfo &BTI, bool Predicated) {
----------------
Please land this refactoring separately.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8393
   std::pair<DenseMap<const Loop *, BackedgeTakenInfo>::iterator, bool> Pair =
       BackedgeTakenCounts.insert({L, BackedgeTakenInfo()});
   if (!Pair.second)
----------------
I wonder, if the key can now be erased, what protects us from infinite recursion?


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

https://reviews.llvm.org/D149251



More information about the llvm-commits mailing list