Skip to content

Commit f4a3309

Browse files
[IPO] Avoid repeated hash lookups (NFC) (#108796)
1 parent 6f52c1e commit f4a3309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/IPO/OpenMPOpt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,8 +2364,8 @@ struct AAICVTrackerFunction : public AAICVTracker {
23642364
/// TODO: Figure out a way to avoid adding entry in
23652365
/// ICVReplacementValuesMap
23662366
Instruction *Entry = &F->getEntryBlock().front();
2367-
if (HasChanged == ChangeStatus::CHANGED && !ValuesMap.count(Entry))
2368-
ValuesMap.insert(std::make_pair(Entry, nullptr));
2367+
if (HasChanged == ChangeStatus::CHANGED)
2368+
ValuesMap.try_emplace(Entry);
23692369
}
23702370

23712371
return HasChanged;

0 commit comments

Comments
 (0)