Skip to content

Commit 47b2230

Browse files
[ExecutionEngine] Avoid repeated hash lookups (NFC) (#110451)
1 parent 619688f commit 47b2230

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,8 @@ void COFFPlatform::pushInitializersLoop(PushInitializersSendResultFn SendResult,
521521
}
522522

523523
for (auto *DepJD : JDDepMap[CurJD])
524-
if (!Visited.count(DepJD)) {
524+
if (Visited.insert(DepJD).second)
525525
Worklist.push_back(DepJD);
526-
Visited.insert(DepJD);
527-
}
528526
}
529527
});
530528

0 commit comments

Comments
 (0)