Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ void coro::doRematerializations(
for (Instruction *U : E.second) {
// Don't process a user twice (this can happen if the instruction uses
// more than one rematerializable def)
if (AllRemats.count(U))
auto [It, Inserted] = AllRemats.try_emplace(U);
if (!Inserted)
continue;

// Constructor creates the whole RematGraph for the given Use
Expand All @@ -306,7 +307,7 @@ void coro::doRematerializations(
++I) { (*I)->Node->dump(); } dbgs()
<< "\n";);

AllRemats[U] = std::move(RematUPtr);
It->second = std::move(RematUPtr);
}
}

Expand Down