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 b8317df commit 8789c00Copy full SHA for 8789c00
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -1679,8 +1679,8 @@ ChangeStatus AAPointerInfoFloating::updateImpl(Attributor &A) {
1679
if (auto *PHI = dyn_cast<PHINode>(Usr)) {
1680
// Note the order here, the Usr access might change the map, CurPtr is
1681
// already in it though.
1682
- bool IsFirstPHIUser = !OffsetInfoMap.count(PHI);
1683
- auto &UsrOI = OffsetInfoMap[PHI];
+ auto [PhiIt, IsFirstPHIUser] = OffsetInfoMap.try_emplace(PHI);
+ auto &UsrOI = PhiIt->second;
1684
auto &PtrOI = OffsetInfoMap[CurPtr];
1685
1686
// Check if the PHI operand has already an unknown offset as we can't
0 commit comments