Skip to content

Commit 6a5a795

Browse files
[Coroutines] Avoid repeated hash looksup (NFC) (#123501)
1 parent 3d15bfb commit 6a5a795

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ struct RematGraph {
8181
!Checker.isDefinitionAcrossSuspend(*D, FirstUse))
8282
continue;
8383

84-
if (Remats.count(D)) {
84+
if (auto It = Remats.find(D); It != Remats.end()) {
8585
// Already have this in the graph
86-
N->Operands.push_back(Remats[D].get());
86+
N->Operands.push_back(It->second.get());
8787
continue;
8888
}
8989

0 commit comments

Comments
 (0)