[ExecutionEngine] Avoid repeated hash lookups (NFC) (#127303)
This commit is contained in:
parent
9453b38ac7
commit
05209f1e59
@ -635,11 +635,12 @@ void MachOPlatform::pushInitializersLoop(
|
||||
Worklist.pop_back();
|
||||
|
||||
// If we've already visited this JITDylib on this iteration then continue.
|
||||
if (JDDepMap.count(DepJD))
|
||||
auto [It, Inserted] = JDDepMap.try_emplace(DepJD);
|
||||
if (!Inserted)
|
||||
continue;
|
||||
|
||||
// Add dep info.
|
||||
auto &DM = JDDepMap[DepJD];
|
||||
auto &DM = It->second;
|
||||
DepJD->withLinkOrderDo([&](const JITDylibSearchOrder &O) {
|
||||
for (auto &KV : O) {
|
||||
if (KV.first == DepJD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user