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 4bc0916 commit 31e8c53Copy full SHA for 31e8c53
mlir/lib/Dialect/Affine/Analysis/Utils.cpp
@@ -1927,9 +1927,9 @@ static std::optional<int64_t> getMemoryFootprintBytes(Block &block,
1927
return opInst->emitError("error obtaining memory region\n");
1928
}
1929
1930
- auto it = regions.find(region->memref);
1931
- if (it == regions.end()) {
1932
- regions[region->memref] = std::move(region);
+ auto [it, inserted] = regions.try_emplace(region->memref);
+ if (inserted) {
+ it->second = std::move(region);
1933
} else if (failed(it->second->unionBoundingBox(*region))) {
1934
return opInst->emitWarning(
1935
"getMemoryFootprintBytes: unable to perform a union on a memory "
0 commit comments