Skip to content

Commit 8d1f385

Browse files
[ADT] Avoid repeated hash lookups (NFC) (#129355)
1 parent ef1128b commit 8d1f385

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/ADT/SCCIterator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ scc_member_iterator<GraphT, GT>::scc_member_iterator(
354354
// Walk through SortedEdges to initialize the queue, instead of using NodeInfoMap
355355
// to ensure an ordered deterministic push.
356356
for (auto *Edge : SortedEdges) {
357-
if (!NodeInfoMap[Edge->Source].Visited &&
358-
NodeInfoMap[Edge->Source].IncomingMSTEdges.empty()) {
357+
auto &Info = NodeInfoMap[Edge->Source];
358+
if (!Info.Visited && Info.IncomingMSTEdges.empty()) {
359359
Queue.push(Edge->Source);
360-
NodeInfoMap[Edge->Source].Visited = true;
360+
Info.Visited = true;
361361
}
362362
}
363363

0 commit comments

Comments
 (0)