def Shape_FunctionLibraryOp : Shape_Op<"function_library",
[AffineScope, IsolatedFromAbove, NoRegionArguments, SymbolTable, Symbol,
- SingleBlockImplicitTerminator<"ShapeFunctionLibraryTerminatorOp">]> {
+ NoTerminator, SingleBlock]> {
let summary = "Represents shape functions and corresponding ops";
let description = [{
Represents a list of shape functions and the ops whose shape transfer
let parser = [{ return ::parse$cppClass(parser, result); }];
}
-//===----------------------------------------------------------------------===//
-// ShapeFunctionLibraryTerminatorOp
-//===----------------------------------------------------------------------===//
-
-def ShapeFunctionLibraryTerminatorOp : Shape_Op<"fn_lib_terminator",
- [Terminator, HasParent<"FunctionLibraryOp">]> {
- let summary = "A pseudo op that marks the end of a shape function library";
- let description = [{
- `shape_fn_lib_terminator` is a special pseudo terminator operation for the
- shape function library. It has no semantic meaning beyond keeping the body
- well-formed.
- }];
- let assemblyFormat = "attr-dict";
-}
-
#endif // SHAPE_OPS
void FunctionLibraryOp::build(OpBuilder &builder, OperationState &result,
StringRef name) {
- ensureTerminator(*result.addRegion(), builder, result.location);
result.attributes.push_back(builder.getNamedAttr(
::mlir::SymbolTable::getSymbolAttrName(), builder.getStringAttr(name)));
}
if (parser.parseRegion(*bodyRegion))
return failure();
- FunctionLibraryOp::ensureTerminator(*bodyRegion, parser.getBuilder(),
- result.location);
if (parser.parseKeyword("mapping"))
return failure();