Skip to content

Commit 3ce3872

Browse files
[Support] Avoid repeated hash lookups (NFC) (#129000)
1 parent 4913e7b commit 3ce3872

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Support/DAGDeltaAlgorithm.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ DAGDeltaAlgorithmImpl::DAGDeltaAlgorithmImpl(
201201
std::set<change_ty> &ChangeSuccs = SuccClosure[Change];
202202
for (pred_iterator_ty it = pred_begin(Change),
203203
ie = pred_end(Change); it != ie; ++it) {
204-
SuccClosure[*it].insert(Change);
205-
SuccClosure[*it].insert(ChangeSuccs.begin(), ChangeSuccs.end());
204+
auto &SC = SuccClosure[*it];
205+
SC.insert(Change);
206+
SC.insert(ChangeSuccs.begin(), ChangeSuccs.end());
206207
Worklist.push_back(*it);
207208
}
208209
}

0 commit comments

Comments
 (0)