We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6eb7d6 commit 2130b9cCopy full SHA for 2130b9c
llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp
@@ -293,7 +293,8 @@ void coro::doRematerializations(
293
for (Instruction *U : E.second) {
294
// Don't process a user twice (this can happen if the instruction uses
295
// more than one rematerializable def)
296
- if (AllRemats.count(U))
+ auto [It, Inserted] = AllRemats.try_emplace(U);
297
+ if (!Inserted)
298
continue;
299
300
// Constructor creates the whole RematGraph for the given Use
@@ -306,7 +307,7 @@ void coro::doRematerializations(
306
307
++I) { (*I)->Node->dump(); } dbgs()
308
<< "\n";);
309
- AllRemats[U] = std::move(RematUPtr);
310
+ It->second = std::move(RematUPtr);
311
}
312
313
0 commit comments