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 9d1fbbd commit 303825dCopy full SHA for 303825d
llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1443,12 +1443,13 @@ 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
+ It->second = Access;
1451
+ }
1452
- ObjToLastAccess[UnderlyingObj] = Access;
1453
LLVM_DEBUG(dbgs() << " " << *UnderlyingObj << "\n");
1454
}
1455
0 commit comments