@@ -1583,13 +1583,12 @@ void OpEmitter::genSeparateArgParamBuilder() {
1583
1583
// Generate builder that infers type too.
1584
1584
// TODO: Subsume this with general checking if type can be
1585
1585
// inferred automatically.
1586
- // TODO: Expand to handle regions.
1587
1586
body << formatv (R"(
1588
1587
::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
1589
1588
if (::mlir::succeeded({0}::inferReturnTypes(odsBuilder.getContext(),
1590
1589
{1}.location, {1}.operands,
1591
1590
{1}.attributes.getDictionary({1}.getContext()),
1592
- /*regions=*/{{} , inferredReturnTypes)))
1591
+ {1}.regions , inferredReturnTypes)))
1593
1592
{1}.addTypes(inferredReturnTypes);
1594
1593
else
1595
1594
::llvm::report_fatal_error("Failed to infer result type(s).");)" ,
@@ -1660,7 +1659,7 @@ void OpEmitter::genSeparateArgParamBuilder() {
1660
1659
// ambiguous function detection will elide those ones.
1661
1660
for (auto attrType : attrBuilderType) {
1662
1661
emit (attrType, TypeParamKind::Separate, /* inferType=*/ false );
1663
- if (canInferType (op) && op. getNumRegions () == 0 )
1662
+ if (canInferType (op))
1664
1663
emit (attrType, TypeParamKind::None, /* inferType=*/ true );
1665
1664
emit (attrType, TypeParamKind::Collective, /* inferType=*/ false );
1666
1665
}
0 commit comments