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 08085ed commit 0078d4bCopy full SHA for 0078d4b
mlir/lib/Pass/Pass.cpp
@@ -938,11 +938,9 @@ AnalysisManager AnalysisManager::nestImmediate(Operation *op) {
938
assert(impl->getOperation() == op->getParentOp() &&
939
"expected immediate child operation");
940
941
- auto it = impl->childAnalyses.find(op);
942
- if (it == impl->childAnalyses.end())
943
- it = impl->childAnalyses
944
- .try_emplace(op, std::make_unique<NestedAnalysisMap>(op, impl))
945
- .first;
+ auto [it, inserted] = impl->childAnalyses.try_emplace(op);
+ if (inserted)
+ it->second = std::make_unique<NestedAnalysisMap>(op, impl);
946
return {it->second.get()};
947
}
948
0 commit comments