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 2d8cd32 commit 0ee5c86Copy full SHA for 0ee5c86
mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
@@ -1538,11 +1538,8 @@ LogicalResult spirv::ModuleOp::verifyRegions() {
1538
1539
auto key = std::pair<spirv::FuncOp, spirv::ExecutionModel>(
1540
funcOp, entryPointOp.getExecutionModel());
1541
- auto entryPtIt = entryPoints.find(key);
1542
- if (entryPtIt != entryPoints.end()) {
+ if (!entryPoints.try_emplace(key, entryPointOp).second)
1543
return entryPointOp.emitError("duplicate of a previous EntryPointOp");
1544
- }
1545
- entryPoints[key] = entryPointOp;
1546
} else if (auto funcOp = dyn_cast<spirv::FuncOp>(op)) {
1547
// If the function is external and does not have 'Import'
1548
// linkage_attributes(LinkageAttributes), throw an error. 'Import'
0 commit comments