We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccad5e7 commit c725cd1Copy full SHA for c725cd1
llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1443,12 +1443,11 @@ void AccessAnalysis::processMemAccesses() {
1443
UnderlyingObj->getType()->getPointerAddressSpace()))
1444
continue;
1445
1446
- UnderlyingObjToAccessMap::iterator Prev =
1447
- ObjToLastAccess.find(UnderlyingObj);
1448
- if (Prev != ObjToLastAccess.end())
1449
- DepCands.unionSets(Access, Prev->second);
+ auto [It, Inserted] =
+ ObjToLastAccess.try_emplace(UnderlyingObj, Access);
+ if (!Inserted)
+ DepCands.unionSets(Access, It->second);
1450
1451
- ObjToLastAccess[UnderlyingObj] = Access;
1452
LLVM_DEBUG(dbgs() << " " << *UnderlyingObj << "\n");
1453
}
1454
0 commit comments