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 de56395 commit 2f88672Copy full SHA for 2f88672
llvm/lib/Transforms/Coroutines/MaterializationUtils.cpp
@@ -70,11 +70,12 @@ struct RematGraph {
70
std::deque<std::unique_ptr<RematNode>> &WorkList,
71
User *FirstUse) {
72
RematNode *N = NUPtr.get();
73
- if (Remats.count(N->Node))
+ auto [It, Inserted] = Remats.try_emplace(N->Node);
74
+ if (!Inserted)
75
return;
76
77
// We haven't see this node yet - add to the list
- Remats[N->Node] = std::move(NUPtr);
78
+ It->second = std::move(NUPtr);
79
for (auto &Def : N->Node->operands()) {
80
Instruction *D = dyn_cast<Instruction>(Def.get());
81
if (!D || !MaterializableCallback(*D) ||
0 commit comments