File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -3078,20 +3078,16 @@ const LoopAccessInfo &LoopAccessInfoManager::getInfo(Loop &L) {
30783078 return *It->second ;
30793079}
30803080void LoopAccessInfoManager::clear () {
3081- SmallVector<Loop *> ToRemove;
30823081 // Collect LoopAccessInfo entries that may keep references to IR outside the
30833082 // analyzed loop or SCEVs that may have been modified or invalidated. At the
30843083 // moment, that is loops requiring memory or SCEV runtime checks, as those cache
30853084 // SCEVs, e.g. for pointer expressions.
3086- for (const auto &[L, LAI] : LoopAccessInfoMap) {
3085+ for (const auto &[L, LAI] : make_early_inc_range ( LoopAccessInfoMap) ) {
30873086 if (LAI->getRuntimePointerChecking ()->getChecks ().empty () &&
30883087 LAI->getPSE ().getPredicate ().isAlwaysTrue ())
30893088 continue ;
3090- ToRemove.push_back (L);
3091- }
3092-
3093- for (Loop *L : ToRemove)
30943089 LoopAccessInfoMap.erase (L);
3090+ }
30953091}
30963092
30973093bool LoopAccessInfoManager::invalidate (
You can’t perform that action at this time.
0 commit comments