We no longer have the non-DAG version.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97856
}
// Base builder for allocate operations
-def fir_AllocateOpBuilder : OpBuilderDAG<(ins
+def fir_AllocateOpBuilder : OpBuilder<(ins
"mlir::Type":$inType,
CArg<"mlir::ValueRange", "{}">:$lenParams,
CArg<"mlir::ValueRange", "{}">:$sizes,
$_state.addAttributes(attributes);
}]>;
-def fir_NamedAllocateOpBuilder : OpBuilderDAG<(ins
+def fir_NamedAllocateOpBuilder : OpBuilder<(ins
"mlir::Type":$inType,
"llvm::StringRef":$name,
CArg<"mlir::ValueRange", "{}">:$lenParams,
$_state.addAttributes(attributes);
}]>;
-def fir_OneResultOpBuilder : OpBuilderDAG<(ins
+def fir_OneResultOpBuilder : OpBuilder<(ins
"mlir::Type":$resultType,
"mlir::ValueRange":$operands,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes),
let builders = [fir_OneResultOpBuilder];
}
-class fir_TwoBuilders<OpBuilderDAG b1, OpBuilderDAG b2> {
- list<OpBuilderDAG> builders = [b1, b2];
+class fir_TwoBuilders<OpBuilder b1, OpBuilder b2> {
+ list<OpBuilder> builders = [b1, b2];
}
class fir_AllocatableBaseOp<string mnemonic, list<OpTrait> traits = []> :
let arguments = (ins Arg<AnyReferenceLike, "", [MemRead]>:$memref);
- let builders = [OpBuilderDAG<(ins "mlir::Value":$refVal),
+ let builders = [OpBuilder<(ins "mlir::Value":$refVal),
[{
if (!refVal) {
mlir::emitError($_state.location, "LoadOp has null argument");
list<OpTrait> traits = []> : fir_SwitchTerminatorOp<mnemonic, traits> {
let skipDefaultBuilders = 1;
- let builders = [OpBuilderDAG<(ins "mlir::Value":$selector,
+ let builders = [OpBuilder<(ins "mlir::Value":$selector,
"llvm::ArrayRef<int64_t>":$compareOperands,
"llvm::ArrayRef<mlir::Block *>":$destinations,
CArg<"llvm::ArrayRef<mlir::ValueRange>", "{}">:$destOperands,
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "mlir::Value":$selector,
+ OpBuilder<(ins "mlir::Value":$selector,
"llvm::ArrayRef<mlir::Attribute>":$compareAttrs,
"llvm::ArrayRef<mlir::ValueRange>":$cmpOperands,
"llvm::ArrayRef<mlir::Block *>":$destinations,
CArg<"llvm::ArrayRef<mlir::ValueRange>", "{}">:$destOperands,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>,
- OpBuilderDAG<(ins "mlir::Value":$selector,
+ OpBuilder<(ins "mlir::Value":$selector,
"llvm::ArrayRef<mlir::Attribute>":$compareAttrs,
"llvm::ArrayRef<mlir::Value>":$cmpOpList,
"llvm::ArrayRef<mlir::Block *>":$destinations,
}];
let skipDefaultBuilders = 1;
- let builders = [OpBuilderDAG<(ins "mlir::Value":$selector,
+ let builders = [OpBuilder<(ins "mlir::Value":$selector,
"llvm::ArrayRef<mlir::Attribute>":$typeOperands,
"llvm::ArrayRef<mlir::Block *>":$destinations,
CArg<"llvm::ArrayRef<mlir::ValueRange>", "{}">:$destOperands,
let results = (outs fir_BoxType);
let builders = [
- OpBuilderDAG<(ins "llvm::ArrayRef<mlir::Type>":$resultTypes,
+ OpBuilder<(ins "llvm::ArrayRef<mlir::Type>":$resultTypes,
"mlir::Value":$memref, CArg<"mlir::Value", "{}">:$shape,
CArg<"mlir::Value", "{}">:$slice,
CArg<"mlir::ValueRange", "{}">:$lenParams),
let verifier = [{ return ::verify(*this); }];
let builders = [
- OpBuilderDAG<(ins "mlir::Type":$resultType,
+ OpBuilder<(ins "mlir::Type":$resultType,
"mlir::Value":$ref, "mlir::ValueRange":$coor),
[{ return build($_builder, $_state, resultType, ref, coor,
mlir::TypeAttr::get(ref.getType())); }]>,
}
}];
- let builders = [OpBuilderDAG<(ins "llvm::StringRef":$fieldName,
+ let builders = [OpBuilder<(ins "llvm::StringRef":$fieldName,
"mlir::Type":$recTy, CArg<"mlir::ValueRange","{}">:$operands),
[{
$_state.addAttribute(fieldAttrName(),
<< ", " << (*this)->getAttr(typeAttrName());
}];
- let builders = [OpBuilderDAG<(ins "llvm::StringRef":$fieldName,
+ let builders = [OpBuilder<(ins "llvm::StringRef":$fieldName,
"mlir::Type":$recTy),
[{
$_state.addAttribute(fieldAttrName(), $_builder.getStringAttr(fieldName));
}];
let arguments = (ins Variadic<AnyType>:$results);
- let builders = [OpBuilderDAG<(ins), [{ /* do nothing */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* do nothing */ }]>];
let assemblyFormat = "($results^ `:` type($results))? attr-dict";
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
+ OpBuilder<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
"mlir::Value":$step, CArg<"bool", "false">:$unordered,
CArg<"bool", "false">:$finalCountValue,
CArg<"mlir::ValueRange", "llvm::None">:$iterArgs,
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "mlir::Value":$cond, "bool":$withElseRegion)>,
- OpBuilderDAG<(ins "mlir::TypeRange":$resultTypes, "mlir::Value":$cond,
+ OpBuilder<(ins "mlir::Value":$cond, "bool":$withElseRegion)>,
+ OpBuilder<(ins "mlir::TypeRange":$resultTypes, "mlir::Value":$cond,
"bool":$withElseRegion)>
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
+ OpBuilder<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
"mlir::Value":$step, "mlir::Value":$iterate,
CArg<"bool", "false">:$finalCountValue,
CArg<"mlir::ValueRange", "llvm::None">:$iterArgs,
let printer = "printCallOp(p, *this);";
let builders = [
- OpBuilderDAG<(ins "mlir::FuncOp":$callee,
+ OpBuilder<(ins "mlir::FuncOp":$callee,
CArg<"mlir::ValueRange", "{}">:$operands),
[{
$_state.addOperands(operands);
$_builder.getSymbolRefAttr(callee));
$_state.addTypes(callee.getType().getResults());
}]>,
- OpBuilderDAG<(ins "mlir::SymbolRefAttr":$callee,
+ OpBuilder<(ins "mlir::SymbolRefAttr":$callee,
"llvm::ArrayRef<mlir::Type>":$results,
CArg<"mlir::ValueRange", "{}">:$operands),
[{
$_state.addAttribute(calleeAttrName(), callee);
$_state.addTypes(results);
}]>,
- OpBuilderDAG<(ins "llvm::StringRef":$callee,
+ OpBuilder<(ins "llvm::StringRef":$callee,
"llvm::ArrayRef<mlir::Type>":$results,
CArg<"mlir::ValueRange", "{}">:$operands),
[{
let results = (outs AnyLogicalLike);
- let builders = [OpBuilderDAG<(ins "mlir::CmpFPredicate":$predicate,
+ let builders = [OpBuilder<(ins "mlir::CmpFPredicate":$predicate,
"mlir::Value":$lhs, "mlir::Value":$rhs), [{
buildCmpFOp($_builder, $_state, predicate, lhs, rhs);
}]>];
let printer = "printCmpcOp(p, *this);";
- let builders = [OpBuilderDAG<(ins "mlir::CmpFPredicate":$predicate,
+ let builders = [OpBuilder<(ins "mlir::CmpFPredicate":$predicate,
"mlir::Value":$lhs, "mlir::Value":$rhs), [{
buildCmpCOp($_builder, $_state, predicate, lhs, rhs);
}]>];
p.printOptionalAttrDict((*this)->getAttrs(), {"in_type"});
}];
- let builders = [OpBuilderDAG<(ins "mlir::TypeAttr":$inty)>];
+ let builders = [OpBuilder<(ins "mlir::TypeAttr":$inty)>];
let verifier = [{
mlir::Type resultTy = getType();
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "llvm::StringRef":$name, "mlir::Type":$type,
+ OpBuilder<(ins "llvm::StringRef":$name, "mlir::Type":$type,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "llvm::StringRef":$name, "bool":$isConstant,
+ OpBuilder<(ins "llvm::StringRef":$name, "bool":$isConstant,
"mlir::Type":$type,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "llvm::StringRef":$name, "mlir::Type":$type,
+ OpBuilder<(ins "llvm::StringRef":$name, "mlir::Type":$type,
CArg<"mlir::StringAttr", "{}">:$linkage,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "llvm::StringRef":$name, "bool":$isConstant,
+ OpBuilder<(ins "llvm::StringRef":$name, "bool":$isConstant,
"mlir::Type":$type, CArg<"mlir::StringAttr", "{}">:$linkage,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "llvm::StringRef":$name, "mlir::Type":$type,
+ OpBuilder<(ins "llvm::StringRef":$name, "mlir::Type":$type,
"mlir::Attribute":$initVal, CArg<"mlir::StringAttr", "{}">:$linkage,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "llvm::StringRef":$name, "bool":$isConstant,
+ OpBuilder<(ins "llvm::StringRef":$name, "bool":$isConstant,
"mlir::Type":$type, "mlir::Attribute":$initVal,
CArg<"mlir::StringAttr", "{}">:$linkage,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs)>,
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "llvm::StringRef":$name, "mlir::Type":$type,
+ OpBuilder<(ins "llvm::StringRef":$name, "mlir::Type":$type,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attrs),
[{
$_state.addAttribute(mlir::SymbolTable::getSymbolAttrName(),
let arguments = (ins F32Attr:$attr);
let builders = [
- OpBuilderDAG<(ins "float":$val)>
+ OpBuilder<(ins "float":$val)>
];
}
```
let arguments = (ins F32Attr:$attr);
let builders = [
- OpBuilderDAG<(ins "float":$val), [{
+ OpBuilder<(ins "float":$val), [{
$_state.addAttribute("attr", $_builder.getF32FloatAttr(val));
}]>
];
let arguments = (ins F32Attr:$attr);
let builders = [
- OpBuilderDAG<(ins CArg<"float", "0.5f">:$val), [{
+ OpBuilder<(ins CArg<"float", "0.5f">:$val), [{
$_state.addAttribute("attr", $_builder.getF32FloatAttr(val));
}]>
];
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
// Call into an autogenerated `build` method.
build(builder, result, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value. This builder
// creates a declaration for `ConstantOp::build` with the given parameters.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
}
```
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// using `builder.create<ConstantOp>(...)`.
let builders = [
// Build a constant with a given constant tensor value.
- OpBuilderDAG<(ins "DenseElementsAttr":$value), [{
+ OpBuilder<(ins "DenseElementsAttr":$value), [{
build($_builder, $_state, value.getType(), value);
}]>,
// Build a constant with a given constant floating-point value.
- OpBuilderDAG<(ins "double":$value)>
+ OpBuilder<(ins "double":$value)>
];
// Invoke a static verify method to verify this constant operation.
// Allow building an AddOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Add custom build methods for the generic call operation.
let builders = [
- OpBuilderDAG<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
+ OpBuilder<(ins "StringRef":$callee, "ArrayRef<Value>":$arguments)>
];
}
// Allow building a MulOp with from the two input operands.
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs)>
];
}
// Allow building a ReturnOp with no return operand.
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
// Provide extra utility definitions on the c++ operation class definition.
// Allow building a StructAccessOp with just a struct value and an index.
let builders = [
- OpBuilderDAG<(ins "Value":$input, "size_t":$index)>
+ OpBuilder<(ins "Value":$input, "size_t":$index)>
];
let verifier = [{ return ::verify(*this); }];
// Allow building a TransposeOp with from the input operand.
let builders = [
- OpBuilderDAG<(ins "Value":$input)>
+ OpBuilder<(ins "Value":$input)>
];
// Invoke a static verify method to verify this transpose operation.
// has a constant builder. That way we wouldn't need to explicitly specify the
// result types here.
let builders = [
- OpBuilderDAG<(ins "AffineMap":$map, "ValueRange":$mapOperands),
+ OpBuilder<(ins "AffineMap":$map, "ValueRange":$mapOperands),
[{
build($_builder, $_state, $_builder.getIndexType(), map, mapOperands);
}]>
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "int64_t":$lowerBound, "int64_t":$upperBound,
+ OpBuilder<(ins "int64_t":$lowerBound, "int64_t":$upperBound,
CArg<"int64_t", "1">:$step, CArg<"ValueRange", "llvm::None">:$iterArgs,
CArg<"function_ref<void(OpBuilder &, Location, Value, ValueRange)>",
"nullptr">:$bodyBuilder)>,
- OpBuilderDAG<(ins "ValueRange":$lbOperands, "AffineMap":$lbMap,
+ OpBuilder<(ins "ValueRange":$lbOperands, "AffineMap":$lbMap,
"ValueRange":$ubOperands, "AffineMap":$ubMap, CArg<"int64_t", "1">:$step,
CArg<"ValueRange", "llvm::None">:$iterArgs,
CArg<"function_ref<void(OpBuilder &, Location, Value, ValueRange)>",
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "IntegerSet":$set, "ValueRange":$args,
+ OpBuilder<(ins "IntegerSet":$set, "ValueRange":$args,
"bool":$withElseRegion)>,
- OpBuilderDAG<(ins "TypeRange":$resultTypes, "IntegerSet":$set,
+ OpBuilder<(ins "TypeRange":$resultTypes, "IntegerSet":$set,
"ValueRange":$args, "bool":$withElseRegion)>,
];
let builders = [
/// Builds an affine load op with the specified map and operands.
- OpBuilderDAG<(ins "AffineMap":$map, "ValueRange":$operands)>,
+ OpBuilder<(ins "AffineMap":$map, "ValueRange":$operands)>,
/// Builds an affine load op with an identity map and operands.
- OpBuilderDAG<(ins "Value":$memref, CArg<"ValueRange", "{}">:$indices)>,
+ OpBuilder<(ins "Value":$memref, CArg<"ValueRange", "{}">:$indices)>,
/// Builds an affine load op with the specified map and its operands.
- OpBuilderDAG<(ins "Value":$memref, "AffineMap":$map,
+ OpBuilder<(ins "Value":$memref, "AffineMap":$map,
"ValueRange":$mapOperands)>
];
let results = (outs Index);
let builders = [
- OpBuilderDAG<(ins "AffineMap":$affineMap, "ValueRange":$mapOperands),
+ OpBuilder<(ins "AffineMap":$affineMap, "ValueRange":$mapOperands),
[{
build($_builder, $_state, $_builder.getIndexType(), affineMap, mapOperands);
}]>
let regions = (region SizedRegion<1>:$region);
let builders = [
- OpBuilderDAG<(ins "TypeRange":$resultTypes,
+ OpBuilder<(ins "TypeRange":$resultTypes,
"ArrayRef<AtomicRMWKind>":$reductions, "ArrayRef<int64_t>":$ranges)>,
- OpBuilderDAG<(ins "TypeRange":$resultTypes,
+ OpBuilder<(ins "TypeRange":$resultTypes,
"ArrayRef<AtomicRMWKind>":$reductions, "AffineMap":$lbMap,
"ValueRange":$lbArgs, "AffineMap":$ubMap, "ValueRange":$ubArgs)>,
- OpBuilderDAG<(ins "TypeRange":$resultTypes,
+ OpBuilder<(ins "TypeRange":$resultTypes,
"ArrayRef<AtomicRMWKind>":$reductions, "AffineMap":$lbMap,
"ValueRange":$lbArgs, "AffineMap":$ubMap, "ValueRange":$ubArgs,
"ArrayRef<int64_t>":$steps)>
BoolAttr:$isDataCache);
let builders = [
- OpBuilderDAG<(ins "Value":$memref, "AffineMap":$map,
+ OpBuilder<(ins "Value":$memref, "AffineMap":$map,
"ArrayRef<Value>":$mapOperands, "bool":$isWrite, "unsigned":$localityHint,
"bool":$isDataCache),
[{
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$valueToStore, "Value":$memref,
+ OpBuilder<(ins "Value":$valueToStore, "Value":$memref,
"ValueRange":$indices)>,
- OpBuilderDAG<(ins "Value":$valueToStore, "Value":$memref, "AffineMap":$map,
+ OpBuilder<(ins "Value":$valueToStore, "Value":$memref, "AffineMap":$map,
"ValueRange":$mapOperands)>
];
let arguments = (ins Variadic<AnyType>:$operands);
let builders = [
- OpBuilderDAG<(ins), [{ build($_builder, $_state, llvm::None); }]>
+ OpBuilder<(ins), [{ build($_builder, $_state, llvm::None); }]>
];
let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?";
let builders = [
/// Builds an affine vector load op with the specified map and operands.
- OpBuilderDAG<(ins "VectorType":$resultType, "AffineMap":$map,
+ OpBuilder<(ins "VectorType":$resultType, "AffineMap":$map,
"ValueRange":$operands)>,
/// Builds an affine vector load op with an identity map and operands.
- OpBuilderDAG<(ins "VectorType":$resultType, "Value":$memref,
+ OpBuilder<(ins "VectorType":$resultType, "Value":$memref,
CArg<"ValueRange", "{}">:$indices)>,
/// Builds an affine vector load op with the specified map and its operands.
- OpBuilderDAG<(ins "VectorType":$resultType, "Value":$memref,
+ OpBuilder<(ins "VectorType":$resultType, "Value":$memref,
"AffineMap":$map, "ValueRange":$mapOperands)>
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$valueToStore, "Value":$memref,
+ OpBuilder<(ins "Value":$valueToStore, "Value":$memref,
"ValueRange":$indices)>,
- OpBuilderDAG<(ins "Value":$valueToStore, "Value":$memref, "AffineMap":$map,
+ OpBuilder<(ins "Value":$valueToStore, "Value":$memref, "AffineMap":$map,
"ValueRange":$mapOperands)>
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "TypeRange":$resultTypes, "ValueRange":$dependencies,
+ OpBuilder<(ins "TypeRange":$resultTypes, "ValueRange":$dependencies,
"ValueRange":$operands,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>",
"nullptr">:$bodyBuilder)>,
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$operand,
+ OpBuilder<(ins "Value":$operand,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "StringRef":$name, "FunctionType":$type,
+ OpBuilder<(ins "StringRef":$name, "FunctionType":$type,
CArg<"TypeRange", "{}">:$workgroupAttributions,
CArg<"TypeRange", "{}">:$privateAttributions,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "GPUFuncOp":$kernelFunc, "KernelDim3":$gridSize,
+ OpBuilder<(ins "GPUFuncOp":$kernelFunc, "KernelDim3":$gridSize,
"KernelDim3":$blockSize, "ValueRange":$kernelOperands)>
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$gridSizeX, "Value":$gridSizeY,
+ OpBuilder<(ins "Value":$gridSizeX, "Value":$gridSizeY,
"Value":$gridSizeZ, "Value":$blockSizeX, "Value":$blockSizeY,
"Value":$blockSizeZ)>
];
by an invocation of the `gpu.func`.
}];
- let builders = [OpBuilderDAG<(ins), [{ // empty}]>];
+ let builders = [OpBuilder<(ins), [{ // empty}]>];
let parser = [{ return parseReturnOp(parser, result); }];
let printer = [{ p << getOperationName(); }];
```
}];
- let builders = [OpBuilderDAG<(ins "StringRef":$name)>];
+ let builders = [OpBuilder<(ins "StringRef":$name)>];
let parser = [{ return ::parseGPUModuleOp(parser, result); }];
let printer = [{ return ::print(p, *this); }];
let regions = (region SizedRegion<1>:$body);
}
def LLVM_OneResultOpBuilder :
- OpBuilderDAG<(ins "Type":$resultType, "ValueRange":$operands,
+ OpBuilder<(ins "Type":$resultType, "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes),
[{
if (resultType) $_state.addTypes(resultType);
}]>;
def LLVM_ZeroResultOpBuilder :
- OpBuilderDAG<(ins "ValueRange":$operands,
+ OpBuilder<(ins "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes),
[{
$_state.addOperands(operands);
// Compatibility builder that takes an instance of wrapped llvm::VoidType
// to indicate no result.
def LLVM_VoidResultTypeOpBuilder :
- OpBuilderDAG<(ins "Type":$resultType, "ValueRange":$operands,
+ OpBuilder<(ins "Type":$resultType, "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes),
[{
assert(isCompatibleType(resultType) && "result must be an LLVM type");
// Opaque builder used for terminator operations that contain successors.
def LLVM_TerminatorPassthroughOpBuilder :
- OpBuilderDAG<(ins "ValueRange":$operands, "SuccessorRange":$destinations,
+ OpBuilder<(ins "ValueRange":$operands, "SuccessorRange":$destinations,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes),
[{
$_state.addOperands(operands);
$res = builder.CreateICmp(getLLVMCmpPredicate($predicate), $lhs, $rhs);
}];
let builders = [
- OpBuilderDAG<(ins "ICmpPredicate":$predicate, "Value":$lhs, "Value":$rhs),
+ OpBuilder<(ins "ICmpPredicate":$predicate, "Value":$lhs, "Value":$rhs),
[{
build($_builder, $_state, IntegerType::get(lhs.getType().getContext(), 1),
$_builder.getI64IntegerAttr(static_cast<int64_t>(predicate)), lhs, rhs);
$res = builder.CreateFCmp(getLLVMCmpPredicate($predicate), $lhs, $rhs);
}];
let builders = [
- OpBuilderDAG<(ins "FCmpPredicate":$predicate, "Value":$lhs, "Value":$rhs,
+ OpBuilder<(ins "FCmpPredicate":$predicate, "Value":$lhs, "Value":$rhs,
CArg<"FastmathFlags", "{}">:$fmf),
[{
build($_builder, $_state, IntegerType::get(lhs.getType().getContext(), 1),
$res = inst;
}];
let builders = [
- OpBuilderDAG<(ins "Type":$resultType, "Value":$arraySize,
+ OpBuilder<(ins "Type":$resultType, "Value":$arraySize,
"unsigned":$alignment),
[{
if (alignment == 0)
$res = inst;
}];
let builders = [
- OpBuilderDAG<(ins "Value":$addr, CArg<"unsigned", "0">:$alignment,
+ OpBuilder<(ins "Value":$addr, CArg<"unsigned", "0">:$alignment,
CArg<"bool", "false">:$isVolatile, CArg<"bool", "false">:$isNonTemporal),
[{
auto type = addr.getType().cast<LLVMPointerType>().getElementType();
build($_builder, $_state, type, addr, alignment, isVolatile, isNonTemporal);
}]>,
- OpBuilderDAG<(ins "Type":$t, "Value":$addr,
+ OpBuilder<(ins "Type":$t, "Value":$addr,
CArg<"unsigned", "0">:$alignment, CArg<"bool", "false">:$isVolatile,
CArg<"bool", "false">:$isNonTemporal)>];
let parser = [{ return parseLoadOp(parser, result); }];
auto *inst = builder.CreateStore($value, $addr, $volatile_);
}] # setAlignmentCode # setNonTemporalMetadataCode;
let builders = [
- OpBuilderDAG<(ins "Value":$value, "Value":$addr,
+ OpBuilder<(ins "Value":$value, "Value":$addr,
CArg<"unsigned", "0">:$alignment, CArg<"bool", "false">:$isVolatile,
CArg<"bool", "false">:$isNonTemporal)>
];
AnySuccessor:$unwindDest);
let builders = [
- OpBuilderDAG<(ins "TypeRange":$tys, "FlatSymbolRefAttr":$callee,
+ OpBuilder<(ins "TypeRange":$tys, "FlatSymbolRefAttr":$callee,
"ValueRange":$ops, "Block*":$normal, "ValueRange":$normalOps,
"Block*":$unwind, "ValueRange":$unwindOps),
[{
$_state.addAttribute("callee", callee);
build($_builder, $_state, tys, ops, normal, normalOps, unwind, unwindOps);
}]>,
- OpBuilderDAG<(ins "TypeRange":$tys, "ValueRange":$ops, "Block*":$normal,
+ OpBuilder<(ins "TypeRange":$tys, "ValueRange":$ops, "Block*":$normal,
"ValueRange":$normalOps, "Block*":$unwind, "ValueRange":$unwindOps),
[{
build($_builder, $_state, tys, /*callee=*/FlatSymbolRefAttr(), ops, normalOps,
DefaultValuedAttr<LLVM_FMFAttr, "{}">:$fastmathFlags);
let results = (outs Variadic<LLVM_Type>);
let builders = [
- OpBuilderDAG<(ins "LLVMFuncOp":$func, "ValueRange":$operands,
+ OpBuilder<(ins "LLVMFuncOp":$func, "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes),
[{
Type resultType = func.getType().getReturnType();
$res = builder.CreateExtractElement($vector, $position);
}];
let builders = [
- OpBuilderDAG<(ins "Value":$vector, "Value":$position,
+ OpBuilder<(ins "Value":$vector, "Value":$position,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
let parser = [{ return parseExtractElementOp(parser, result); }];
let printer = [{ printExtractElementOp(p, *this); }];
extractPosition($position));
}];
let builders = [
- OpBuilderDAG<(ins "Value":$container, "Value":$value, "ArrayAttr":$position),
+ OpBuilder<(ins "Value":$container, "Value":$value, "ArrayAttr":$position),
[{
build($_builder, $_state, container.getType(), container, value, position);
}]>];
$res = builder.CreateShuffleVector($v1, $v2, mask);
}];
let builders = [
- OpBuilderDAG<(ins "Value":$v1, "Value":$v2, "ArrayAttr":$mask,
+ OpBuilder<(ins "Value":$v1, "Value":$v2, "ArrayAttr":$mask,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
let verifier = [{
auto type1 = v1().getType();
LLVM_Type:$trueValue, LLVM_Type:$falseValue);
let results = (outs LLVM_Type:$res);
let builders = [
- OpBuilderDAG<(ins "Value":$condition, "Value":$lhs, "Value":$rhs),
+ OpBuilder<(ins "Value":$condition, "Value":$lhs, "Value":$rhs),
[{
build($_builder, $_state, lhs.getType(), condition, lhs, rhs);
}]>];
}];
let builders = [
- OpBuilderDAG<(ins "Value":$condition, "Block *":$trueDest,
+ OpBuilder<(ins "Value":$condition, "Block *":$trueDest,
"ValueRange":$trueOperands, "Block *":$falseDest,
"ValueRange":$falseOperands,
CArg<"Optional<std::pair<uint32_t, uint32_t>>", "{}">:$weights),
build($_builder, $_state, condition, trueOperands, falseOperands, weightsAttr,
trueDest, falseDest);
}]>,
- OpBuilderDAG<(ins "Value":$condition, "Block *":$trueDest,
+ OpBuilder<(ins "Value":$condition, "Block *":$trueDest,
"Block *":$falseDest, CArg<"ValueRange", "{}">:$falseOperands),
[{
build($_builder, $_state, condition, trueDest, ValueRange(), falseDest,
}];
let builders = [
- OpBuilderDAG<(ins "Value":$value,
+ OpBuilder<(ins "Value":$value,
"Block *":$defaultDestination,
"ValueRange":$defaultOperands,
CArg<"ArrayRef<int32_t>", "{}">:$caseValues,
}];
let builders = [
- OpBuilderDAG<(ins "GlobalOp":$global,
+ OpBuilder<(ins "GlobalOp":$global,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs),
[{
build($_builder, $_state,
global.sym_name());
$_state.addAttributes(attrs);
}]>,
- OpBuilderDAG<(ins "LLVMFuncOp":$func,
+ OpBuilder<(ins "LLVMFuncOp":$func,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs),
[{
build($_builder, $_state,
let regions = (region AnyRegion:$initializer);
let builders = [
- OpBuilderDAG<(ins "Type":$type, "bool":$isConstant, "Linkage":$linkage,
+ OpBuilder<(ins "Type":$type, "bool":$isConstant, "Linkage":$linkage,
"StringRef":$name, "Attribute":$value, CArg<"unsigned", "0">:$addrSpace,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "StringRef":$name, "Type":$type,
+ OpBuilder<(ins "StringRef":$name, "Type":$type,
CArg<"Linkage", "Linkage::External">:$linkage,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs,
CArg<"ArrayRef<DictionaryAttr>", "{}">:$argAttrs)>
}];
let builders = [
- OpBuilderDAG<(ins "ValueRange":$shape,
+ OpBuilder<(ins "ValueRange":$shape,
"ArrayRef<int64_t>":$staticShape, "Type":$elementType),
[{
build($_builder, $_state,
InitTensorOp::inferResultType(staticShape, elementType),
shape, $_builder.getI64ArrayAttr(staticShape));
}]>,
- OpBuilderDAG<(ins "ValueRange":$shape, "Type":$elementType),
+ OpBuilder<(ins "ValueRange":$shape, "Type":$elementType),
[{
SmallVector<int64_t, 4> staticShape(
shape.size(), ShapedType::kDynamicSize);
build($_builder, $_state, shape, staticShape, elementType);
}]>,
- OpBuilderDAG<(ins "ArrayRef<int64_t>":$staticShape, "Type":$elementType),
+ OpBuilder<(ins "ArrayRef<int64_t>":$staticShape, "Type":$elementType),
[{
build($_builder, $_state, ValueRange{}, staticShape, elementType);
}]>,
- OpBuilderDAG<(ins "ArrayRef<OpFoldResult>":$sizes, "Type":$elementType,
+ OpBuilder<(ins "ArrayRef<OpFoldResult>":$sizes, "Type":$elementType,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
let builders = [
// Build a PadTensorOp with mixed static and dynamic entries.
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<int64_t>":$staticLow,
+ OpBuilder<(ins "Value":$source, "ArrayRef<int64_t>":$staticLow,
"ArrayRef<int64_t>":$staticHigh, "ValueRange":$low, "ValueRange":$high,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a PadTensorOp with all dynamic entries.
- OpBuilderDAG<(ins "Value":$source, "ValueRange":$low, "ValueRange":$high,
+ OpBuilder<(ins "Value":$source, "ValueRange":$low, "ValueRange":$high,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a PadTensorOp with mixed static and dynamic entries and custom
// result type. If the type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "Type":$resultType, "Value":$source,
+ OpBuilder<(ins "Type":$resultType, "Value":$source,
"ArrayRef<OpFoldResult>":$low, "ArrayRef<OpFoldResult>":$high,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
````
}];
let builders = [
- OpBuilderDAG<(ins "Value":$min, "Value":$max, "Value":$step),
+ OpBuilder<(ins "Value":$min, "Value":$max, "Value":$step),
[{
auto rangeType = RangeType::get($_builder.getContext());
build($_builder, $_state, rangeType, min, max, step);
let builders = [
// Builders for a contracting reshape whose result type is computed from
// `src` and `reassociation`.
- OpBuilderDAG<(ins "Value":$src,
+ OpBuilder<(ins "Value":$src,
"ArrayRef<ReassociationExprs>":$reassociation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "Value":$src,
+ OpBuilder<(ins "Value":$src,
"ArrayRef<ReassociationIndices>":$reassociation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs),
[{
// Builders for a reshape whose result type is passed explicitly. This may
// be either a contracting or expanding reshape.
- OpBuilderDAG<(ins "Type":$resultType, "Value":$src,
+ OpBuilder<(ins "Type":$resultType, "Value":$src,
"ArrayRef<ReassociationExprs>":$reassociation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
- OpBuilderDAG<(ins "Type":$resultType, "Value":$src,
+ OpBuilder<(ins "Type":$resultType, "Value":$src,
"ArrayRef<ReassociationIndices>":$reassociation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs),
[{
linalg.yield %f0, %f1 : f32, f32
```
}];
- let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
}
def Linalg_TiledLoopOp : Linalg_Op<"tiled_loop", [
let regions = (region SizedRegion<1>:$region);
let builders = [
- OpBuilderDAG<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
+ OpBuilder<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
"ValueRange":$steps, "ValueRange":$inputs, "ValueRange":$outputs,
"ArrayRef<StringRef>":$iteratorTypes,
CArg<"function_ref<void (OpBuilder &, Location, ValueRange)>",
let regions = (region AnyRegion:$region);
let builders = [
- OpBuilderDAG<(ins "Value":$input, "Value":$output,
+ OpBuilder<(ins "Value":$input, "Value":$output,
CArg<"AffineMap", "AffineMap()">:$inputPermutation,
CArg<"AffineMap", "AffineMap()">:$outputPermutation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
}];
let builders = [
- OpBuilderDAG<(ins "Value":$output, "Value":$value)>
+ OpBuilder<(ins "Value":$output, "Value":$value)>
];
let verifier = [{ return ::verify(*this); }];
}];
let builders = [
- OpBuilderDAG<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
+ OpBuilder<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes, "StringRef":$doc,
"StringRef":$libraryCall,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
- OpBuilderDAG<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
+ OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
"StringRef":$doc, "StringRef":$libraryCall,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
- OpBuilderDAG<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
+ OpBuilder<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>,
- OpBuilderDAG<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
+ OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange)>", "nullptr">)>
];
}];
let builders = [
- OpBuilderDAG<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
+ OpBuilder<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes, "StringRef":$doc,
"StringRef":$libraryCall,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange, ValueRange)>",
"nullptr">)>,
- OpBuilderDAG<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
+ OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
"StringRef":$doc, "StringRef":$libraryCall,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange, ValueRange)>",
"nullptr">)>,
- OpBuilderDAG<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
+ OpBuilder<(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, "ArrayRef<AffineMap>":$indexingMaps,
"ArrayRef<StringRef>":$iteratorTypes,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange, ValueRange)>",
"nullptr">)>,
- OpBuilderDAG<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
+ OpBuilder<(ins "ValueRange":$inputs, "ValueRange":$outputBuffers,
"ArrayRef<AffineMap>":$indexingMaps, "ArrayRef<StringRef>":$iteratorTypes,
CArg<"function_ref<void(OpBuilder &, Location, ValueRange, ValueRange)>",
"nullptr">)>
let arguments = (ins Variadic<AnyType>:$operands);
- let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
let verifier = ?;
let regions = (region AnyRegion:$region);
let builders = [
- OpBuilderDAG<(ins CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>
+ OpBuilder<(ins CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>
];
let parser = [{ return parseParallelOp(parser, result); }];
let printer = [{ return printParallelOp(p, *this); }];
UnitAttr:$inclusive);
let builders = [
- OpBuilderDAG<(ins "ValueRange":$lowerBound, "ValueRange":$upperBound,
+ OpBuilder<(ins "ValueRange":$lowerBound, "ValueRange":$upperBound,
"ValueRange":$step,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attributes)>
];
}];
let builders = [
- OpBuilderDAG<(ins "StringRef":$name, CArg<"ValueRange", "{}">:$args,
+ OpBuilder<(ins "StringRef":$name, CArg<"ValueRange", "{}">:$args,
CArg<"ArrayRef<Attribute>", "{}">:$params), [{
build($_builder, $_state, $_builder.getStringAttr(name), args,
params.empty() ? ArrayAttr() : $_builder.getArrayAttr(params));
let assemblyFormat = "attr-dict (`:` $type^)? ($value^)?";
let builders = [
- OpBuilderDAG<(ins CArg<"Value", "Value()">:$type), [{
+ OpBuilder<(ins CArg<"Value", "Value()">:$type), [{
build($_builder, $_state, $_builder.getType<AttributeType>(), type,
Attribute());
}]>,
- OpBuilderDAG<(ins "Attribute":$attr), [{
+ OpBuilder<(ins "Attribute":$attr), [{
build($_builder, $_state, $_builder.getType<AttributeType>(), Value(), attr);
}]>,
];
let assemblyFormat = "(`:` $type^)? attr-dict";
let builders = [
- OpBuilderDAG<(ins), [{
+ OpBuilder<(ins), [{
build($_builder, $_state, $_builder.getType<ValueType>(), Value());
}]>,
];
let results = (outs PDL_Operation:$op,
Variadic<PDL_Value>:$results);
let builders = [
- OpBuilderDAG<(ins CArg<"Optional<StringRef>", "llvm::None">:$name,
+ OpBuilder<(ins CArg<"Optional<StringRef>", "llvm::None">:$name,
CArg<"ValueRange", "llvm::None">:$operandValues,
CArg<"ArrayRef<StringRef>", "llvm::None">:$attrNames,
CArg<"ValueRange", "llvm::None">:$attrValues,
}];
let builders = [
- OpBuilderDAG<(ins CArg<"Optional<StringRef>", "llvm::None">:$rootKind,
+ OpBuilder<(ins CArg<"Optional<StringRef>", "llvm::None">:$rootKind,
CArg<"Optional<uint16_t>", "1">:$benefit,
CArg<"Optional<StringRef>", "llvm::None">:$name)>,
];
let assemblyFormat = "attr-dict (`:` $type^)?";
let builders = [
- OpBuilderDAG<(ins CArg<"Type", "Type()">:$ty), [{
+ OpBuilder<(ins CArg<"Type", "Type()">:$ty), [{
build($_builder, $_state, $_builder.getType<AttributeType>(),
ty ? TypeAttr::get(ty) : TypeAttr());
}]>,
let assemblyFormat = "$value attr-dict";
let builders = [
- OpBuilderDAG<(ins "Attribute":$value), [{
+ OpBuilder<(ins "Attribute":$value), [{
build($_builder, $_state, $_builder.getType<pdl::AttributeType>(), value);
}]>];
}
let results = (outs PDL_Operation:$operation);
let builders = [
- OpBuilderDAG<(ins "StringRef":$name, "ValueRange":$types,
+ OpBuilder<(ins "StringRef":$name, "ValueRange":$types,
"ValueRange":$operands, "ValueRange":$attributes,
"ArrayAttr":$attributeNames), [{
build($_builder, $_state, $_builder.getType<pdl::OperationType>(), name,
let assemblyFormat = "$value attr-dict";
let builders = [
- OpBuilderDAG<(ins "TypeAttr":$type), [{
+ OpBuilder<(ins "TypeAttr":$type), [{
build($_builder, $_state, $_builder.getType<pdl::TypeType>(), type);
}]>
];
let assemblyFormat = "`of` $value attr-dict";
let builders = [
- OpBuilderDAG<(ins "Value":$value), [{
+ OpBuilder<(ins "Value":$value), [{
build($_builder, $_state, $_builder.getType<pdl::TypeType>(), value);
}]>
];
let assemblyFormat = "`of` $value attr-dict";
let builders = [
- OpBuilderDAG<(ins "Value":$value), [{
+ OpBuilder<(ins "Value":$value), [{
build($_builder, $_state, $_builder.getType<pdl::TypeType>(), value);
}]>
];
let assemblyFormat = "attr-dict";
let builders = [
- OpBuilderDAG<(ins), [{
+ OpBuilder<(ins), [{
build($_builder, $_state, $_builder.getType<pdl::TypeType>());
}]>,
];
}];
let builders = [
- OpBuilderDAG<(ins "Value":$attribute, "ArrayRef<Attribute>":$caseValues,
+ OpBuilder<(ins "Value":$attribute, "ArrayRef<Attribute>":$caseValues,
"Block *":$defaultDest, "BlockRange":$dests), [{
build($_builder, $_state, attribute, $_builder.getArrayAttr(caseValues),
defaultDest, dests);
}];
let builders = [
- OpBuilderDAG<(ins "Value":$operation, "ArrayRef<int32_t>":$counts,
+ OpBuilder<(ins "Value":$operation, "ArrayRef<int32_t>":$counts,
"Block *":$defaultDest, "BlockRange":$dests), [{
build($_builder, $_state, operation, $_builder.getI32VectorAttr(counts),
defaultDest, dests);
}];
let builders = [
- OpBuilderDAG<(ins "Value":$operation, "ArrayRef<OperationName>":$names,
+ OpBuilder<(ins "Value":$operation, "ArrayRef<OperationName>":$names,
"Block *":$defaultDest, "BlockRange":$dests), [{
auto stringNames = llvm::to_vector<8>(llvm::map_range(names,
[](OperationName name) { return name.getStringRef(); }));
}];
let builders = [
- OpBuilderDAG<(ins "Value":$operation, "ArrayRef<int32_t>":$counts,
+ OpBuilder<(ins "Value":$operation, "ArrayRef<int32_t>":$counts,
"Block *":$defaultDest, "BlockRange":$dests), [{
build($_builder, $_state, operation, $_builder.getI32VectorAttr(counts),
defaultDest, dests);
}];
let builders = [
- OpBuilderDAG<(ins "Value":$edge, "TypeRange":$types, "Block *":$defaultDest,
+ OpBuilder<(ins "Value":$edge, "TypeRange":$types, "Block *":$defaultDest,
"BlockRange":$dests), [{
build($_builder, $_state, edge, $_builder.getTypeArrayAttr(types),
defaultDest, dests);
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$lowerBound, "Value":$upperBound, "Value":$step,
+ OpBuilder<(ins "Value":$lowerBound, "Value":$upperBound, "Value":$step,
CArg<"ValueRange", "llvm::None">:$iterArgs,
CArg<"function_ref<void(OpBuilder &, Location, Value, ValueRange)>",
"nullptr">)>
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$cond, "bool":$withElseRegion)>,
- OpBuilderDAG<(ins "TypeRange":$resultTypes, "Value":$cond,
+ OpBuilder<(ins "Value":$cond, "bool":$withElseRegion)>,
+ OpBuilder<(ins "TypeRange":$resultTypes, "Value":$cond,
"bool":$withElseRegion)>,
- OpBuilderDAG<(ins "TypeRange":$resultTypes, "Value":$cond,
+ OpBuilder<(ins "TypeRange":$resultTypes, "Value":$cond,
CArg<"function_ref<void(OpBuilder &, Location)>",
"buildTerminatedBody">:$thenBuilder,
CArg<"function_ref<void(OpBuilder &, Location)>",
"nullptr">:$elseBuilder)>,
- OpBuilderDAG<(ins "Value":$cond,
+ OpBuilder<(ins "Value":$cond,
CArg<"function_ref<void(OpBuilder &, Location)>",
"buildTerminatedBody">:$thenBuilder,
CArg<"function_ref<void(OpBuilder &, Location)>",
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
+ OpBuilder<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
"ValueRange":$steps, "ValueRange":$initVals,
CArg<"function_ref<void (OpBuilder &, Location, ValueRange, ValueRange)>",
"nullptr">:$bodyBuilderFn)>,
- OpBuilderDAG<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
+ OpBuilder<(ins "ValueRange":$lowerBounds, "ValueRange":$upperBounds,
"ValueRange":$steps,
CArg<"function_ref<void (OpBuilder &, Location, ValueRange)>",
"nullptr">:$bodyBuilderFn)>,
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Value":$operand,
+ OpBuilder<(ins "Value":$operand,
CArg<"function_ref<void (OpBuilder &, Location, Value, Value)>",
"nullptr">:$bodyBuilderFn)>
];
}];
let arguments = (ins Variadic<AnyType>:$results);
- let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
let assemblyFormat =
[{ attr-dict ($results^ `:` type($results))? }];
);
let builders = [
- OpBuilderDAG<(ins "Value":$pointer, "::mlir::spirv::Scope":$scope,
+ OpBuilder<(ins "Value":$pointer, "::mlir::spirv::Scope":$scope,
"::mlir::spirv::MemorySemantics":$memory, "Value":$value),
[{build($_builder, $_state, value.getType(), pointer, scope, memory, value);}]>
];
);
let builders = [
- OpBuilderDAG<(ins "Value":$composite, "ArrayRef<int32_t>":$indices)>
+ OpBuilder<(ins "Value":$composite, "ArrayRef<int32_t>":$indices)>
];
let hasFolder = 1;
);
let builders = [
- OpBuilderDAG<(ins "Value":$object, "Value":$composite,
+ OpBuilder<(ins "Value":$object, "Value":$composite,
"ArrayRef<int32_t>":$indices)>
];
}
let verifier = [{ return success(); }];
let builders = [
- OpBuilderDAG<(ins "Block *":$successor, CArg<"ValueRange", "{}">:$arguments),
+ OpBuilder<(ins "Block *":$successor, CArg<"ValueRange", "{}">:$arguments),
[{
$_state.addSuccessors(successor);
$_state.addOperands(arguments);
AnySuccessor:$falseTarget);
let builders = [
- OpBuilderDAG<(ins "Value":$condition, "Block *":$trueBlock,
+ OpBuilder<(ins "Value":$condition, "Block *":$trueBlock,
"ValueRange":$trueArguments, "Block *":$falseBlock,
"ValueRange":$falseArguments,
CArg<"Optional<std::pair<uint32_t, uint32_t>>", "{}">:$weights),
let regions = (region AnyRegion:$body);
- let builders = [OpBuilderDAG<(ins)>];
+ let builders = [OpBuilder<(ins)>];
let extraClassDeclaration = [{
// Returns the entry block.
let printer = [{ return ::printLogicalOp(getOperation(), p); }];
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs),
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs),
[{::buildLogicalBinaryOp($_builder, $_state, lhs, rhs);}]>
];
}
let printer = [{ return ::printLogicalOp(getOperation(), p); }];
let builders = [
- OpBuilderDAG<(ins "Value":$value),
+ OpBuilder<(ins "Value":$value),
[{::buildLogicalUnaryOp($_builder, $_state, value);}]>
];
}
);
let builders = [
- OpBuilderDAG<(ins "Value":$cond, "Value":$trueValue, "Value":$falseValue)>];
+ OpBuilder<(ins "Value":$cond, "Value":$trueValue, "Value":$falseValue)>];
let assemblyFormat = [{
operands attr-dict `:` type($condition) `,` type($result)
SPV_AnyPtr:$component_ptr
);
- let builders = [OpBuilderDAG<(ins "Value":$basePtr, "ValueRange":$indices)>];
+ let builders = [OpBuilder<(ins "Value":$basePtr, "ValueRange":$indices)>];
let hasCanonicalizer = 1;
}
);
let builders = [
- OpBuilderDAG<(ins "Value":$basePtr,
+ OpBuilder<(ins "Value":$basePtr,
CArg<"IntegerAttr", "{}">:$memory_access,
CArg<"IntegerAttr", "{}">:$alignment)>
];
let results = (outs);
let builders = [
- OpBuilderDAG<(ins "Value":$ptr, "Value":$value,
+ OpBuilder<(ins "Value":$ptr, "Value":$value,
CArg<"ArrayRef<NamedAttribute>", "{}">:$namedAttrs),
[{
$_state.addOperands(ptr);
SPV_Bool:$result
);
- let builders = [OpBuilderDAG<(ins "spirv::Scope")>];
+ let builders = [OpBuilder<(ins "spirv::Scope")>];
let assemblyFormat = "$execution_scope attr-dict `:` type($result)";
}
let autogenSerialization = 0;
- let builders = [OpBuilderDAG<(ins "spirv::GlobalVariableOp":$var)>];
+ let builders = [OpBuilder<(ins "spirv::GlobalVariableOp":$var)>];
let assemblyFormat = "$variable attr-dict `:` type($pointer)";
}
let autogenSerialization = 0;
let builders = [
- OpBuilderDAG<(ins "spirv::ExecutionModel":$executionModel,
+ OpBuilder<(ins "spirv::ExecutionModel":$executionModel,
"spirv::FuncOp":$function, "ArrayRef<Attribute>":$interfaceVars)>];
}
let autogenSerialization = 0;
let builders = [
- OpBuilderDAG<(ins "spirv::FuncOp":$function,
+ OpBuilder<(ins "spirv::FuncOp":$function,
"spirv::ExecutionMode":$executionMode, "ArrayRef<int32_t>":$params)>];
}
let verifier = [{ return success(); }];
let builders = [
- OpBuilderDAG<(ins "StringRef":$name, "FunctionType":$type,
+ OpBuilder<(ins "StringRef":$name, "FunctionType":$type,
CArg<"spirv::FunctionControl", "spirv::FunctionControl::None">:$control,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
let results = (outs);
let builders = [
- OpBuilderDAG<(ins "TypeAttr":$type, "ArrayRef<NamedAttribute>":$namedAttrs),
+ OpBuilder<(ins "TypeAttr":$type, "ArrayRef<NamedAttribute>":$namedAttrs),
[{
$_state.addAttribute("type", type);
$_state.addAttributes(namedAttrs);
}]>,
- OpBuilderDAG<(ins "Type":$type, "StringRef":$name,
+ OpBuilder<(ins "Type":$type, "StringRef":$name,
"unsigned":$descriptorSet, "unsigned":$binding)>,
- OpBuilderDAG<(ins "Type":$type, "StringRef":$name,
+ OpBuilder<(ins "Type":$type, "StringRef":$name,
"spirv::BuiltIn":$builtin)>
];
let regions = (region SizedRegion<1>:$body);
let builders = [
- OpBuilderDAG<(ins CArg<"Optional<StringRef>", "llvm::None">:$name)>,
- OpBuilderDAG<(ins "spirv::AddressingModel":$addressing_model,
+ OpBuilder<(ins CArg<"Optional<StringRef>", "llvm::None">:$name)>,
+ OpBuilder<(ins "spirv::AddressingModel":$addressing_model,
"spirv::MemoryModel":$memory_model,
CArg<"Optional<StringRef>", "llvm::None">:$name)>
];
$shapes attr-dict `:` type($shapes) `->` type($result)
}];
- let builders = [OpBuilderDAG<(ins "::mlir::Type":$result,
+ let builders = [OpBuilder<(ins "::mlir::Type":$result,
"::mlir::Value":$lhs, "::mlir::Value":$rhs,
"/*optional*/ ::mlir::StringAttr":$error), [{
build($_builder, $_state, result, ::llvm::makeArrayRef({lhs, rhs}), error);
let arguments = (ins IndexAttr:$value);
let results = (outs Shape_SizeType:$result);
- let builders = [OpBuilderDAG<(ins "int64_t":$value)>];
+ let builders = [OpBuilder<(ins "int64_t":$value)>];
let assemblyFormat = "$value attr-dict";
let hasFolder = 1;
// Convenience builder alias for the binary version.
let builders = [
- OpBuilderDAG<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
+ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
[{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>,
];
let extraClassDeclaration = [{
let results = (outs I1:$result);
let builders = [
- OpBuilderDAG<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
+ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
[{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>,
];
let extraClassDeclaration = [{
let builders = [
// Builder that allows passing a constant dimension as a simple integer.
- OpBuilderDAG<(ins "Value":$shape, "int64_t":$dim)>
+ OpBuilder<(ins "Value":$shape, "int64_t":$dim)>
];
let extraClassDeclaration = [{
let arguments = (ins Shape_ShapeOrExtentTensorType:$shape);
let results = (outs Shape_SizeOrIndexType:$result);
- let builders = [OpBuilderDAG<(ins "Value":$shape)>];
+ let builders = [OpBuilder<(ins "Value":$shape)>];
let assemblyFormat = "$shape attr-dict `:` type($shape) `->` type($result)";
let results = (outs Variadic<AnyType>:$result);
let regions = (region SizedRegion<1>:$region);
- let builders = [OpBuilderDAG<(ins "Value":$shape, "ValueRange":$initVals)>];
+ let builders = [OpBuilder<(ins "Value":$shape, "ValueRange":$initVals)>];
let verifier = [{ return ::verify(*this); }];
let printer = [{ return ::print(p, *this); }];
let assemblyFormat = "$arg attr-dict `:` type($arg) `->` type($result)";
- let builders = [OpBuilderDAG<(ins "Value":$arg)>];
+ let builders = [OpBuilder<(ins "Value":$arg)>];
let verifier = [{ return ::verifyShapeOrExtentTensorOp(*this); }];
let hasCanonicalizer = 1;
let arguments = (ins Variadic<AnyType>:$operands);
- let builders = [OpBuilderDAG<(ins),
+ let builders = [OpBuilder<(ins),
[{ build($_builder, $_state, llvm::None); }]>
];
let arguments = (ins Variadic<AnyType>:$operands);
- let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?";
}
let assemblyFormat = "$shapes attr-dict `:` type($shapes)";
let builders = [
- OpBuilderDAG<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
+ OpBuilder<(ins "::mlir::Value":$lhs, "::mlir::Value":$rhs),
[{ build($_builder, $_state, ::llvm::makeArrayRef({lhs, rhs})); }]>,
];
FuncOp getShapeFunction(Operation *op);
}];
- let builders = [OpBuilderDAG<(ins "StringRef":$name)>];
+ let builders = [OpBuilder<(ins "StringRef":$name)>];
let skipDefaultBuilders = 1;
let printer = [{ ::print(p, *this); }];
let results = (outs AnyType);
let builders = [
- OpBuilderDAG<(ins "Value":$source, "Type":$destType), [{
+ OpBuilder<(ins "Value":$source, "Type":$destType), [{
impl::buildCastOp($_builder, $_state, source, destType);
}]>
];
let results = (outs Res<AnyMemRef, "", [MemAlloc<resource>]>:$memref);
let builders = [
- OpBuilderDAG<(ins "MemRefType":$memrefType,
+ OpBuilder<(ins "MemRefType":$memrefType,
CArg<"IntegerAttr", "IntegerAttr()">:$alignment), [{
return build($_builder, $_state, memrefType, {}, alignment);
}]>,
- OpBuilderDAG<(ins "MemRefType":$memrefType, "ValueRange":$dynamicSizes,
+ OpBuilder<(ins "MemRefType":$memrefType, "ValueRange":$dynamicSizes,
CArg<"IntegerAttr", "IntegerAttr()">:$alignment), [{
return build($_builder, $_state, memrefType, dynamicSizes, {}, alignment);
}]>,
- OpBuilderDAG<(ins "MemRefType":$memrefType, "ValueRange":$dynamicSizes,
+ OpBuilder<(ins "MemRefType":$memrefType, "ValueRange":$dynamicSizes,
"ValueRange":$symbolOperands,
CArg<"IntegerAttr", "{}">:$alignment), [{
$_state.types.push_back(memrefType);
let regions = (region AnyRegion:$body);
let skipDefaultBuilders = 1;
- let builders = [OpBuilderDAG<(ins "Value":$memref, "ValueRange":$ivs)>];
+ let builders = [OpBuilder<(ins "Value":$memref, "ValueRange":$ivs)>];
let extraClassDeclaration = [{
// The value stored in memref[ivs].
let successors = (successor AnySuccessor:$dest);
let builders = [
- OpBuilderDAG<(ins "Block *":$dest,
+ OpBuilder<(ins "Block *":$dest,
CArg<"ValueRange", "{}">:$destOperands), [{
$_state.addSuccessors(dest);
$_state.addOperands(destOperands);
let results = (outs Variadic<AnyType>);
let builders = [
- OpBuilderDAG<(ins "FuncOp":$callee, CArg<"ValueRange", "{}">:$operands), [{
+ OpBuilder<(ins "FuncOp":$callee, CArg<"ValueRange", "{}">:$operands), [{
$_state.addOperands(operands);
$_state.addAttribute("callee",$_builder.getSymbolRefAttr(callee));
$_state.addTypes(callee.getType().getResults());
}]>,
- OpBuilderDAG<(ins "SymbolRefAttr":$callee, "TypeRange":$results,
+ OpBuilder<(ins "SymbolRefAttr":$callee, "TypeRange":$results,
CArg<"ValueRange", "{}">:$operands), [{
$_state.addOperands(operands);
$_state.addAttribute("callee", callee);
$_state.addTypes(results);
}]>,
- OpBuilderDAG<(ins "StringRef":$callee, "TypeRange":$results,
+ OpBuilder<(ins "StringRef":$callee, "TypeRange":$results,
CArg<"ValueRange", "{}">:$operands), [{
build($_builder, $_state, $_builder.getSymbolRefAttr(callee), results,
operands);
let results = (outs Variadic<AnyType>:$results);
let builders = [
- OpBuilderDAG<(ins "Value":$callee, CArg<"ValueRange", "{}">:$operands), [{
+ OpBuilder<(ins "Value":$callee, CArg<"ValueRange", "{}">:$operands), [{
$_state.operands.push_back(callee);
$_state.addOperands(operands);
$_state.addTypes(callee.getType().cast<FunctionType>().getResults());
let results = (outs BoolLike:$result);
let builders = [
- OpBuilderDAG<(ins "CmpFPredicate":$predicate, "Value":$lhs,
+ OpBuilder<(ins "CmpFPredicate":$predicate, "Value":$lhs,
"Value":$rhs), [{
::buildCmpFOp($_builder, $_state, predicate, lhs, rhs);
}]>];
let results = (outs BoolLike:$result);
let builders = [
- OpBuilderDAG<(ins "CmpIPredicate":$predicate, "Value":$lhs,
+ OpBuilder<(ins "CmpIPredicate":$predicate, "Value":$lhs,
"Value":$rhs), [{
::buildCmpIOp($_builder, $_state, predicate, lhs, rhs);
}]>];
let successors = (successor AnySuccessor:$trueDest, AnySuccessor:$falseDest);
let builders = [
- OpBuilderDAG<(ins "Value":$condition, "Block *":$trueDest,
+ OpBuilder<(ins "Value":$condition, "Block *":$trueDest,
"ValueRange":$trueOperands, "Block *":$falseDest,
"ValueRange":$falseOperands), [{
build($_builder, $_state, condition, trueOperands, falseOperands, trueDest,
falseDest);
}]>,
- OpBuilderDAG<(ins "Value":$condition, "Block *":$trueDest,
+ OpBuilder<(ins "Value":$condition, "Block *":$trueDest,
"Block *":$falseDest, CArg<"ValueRange", "{}">:$falseOperands), [{
build($_builder, $_state, condition, trueDest, ValueRange(), falseDest,
falseOperands);
let results = (outs AnyType);
let builders = [
- OpBuilderDAG<(ins "Attribute":$value),
+ OpBuilder<(ins "Attribute":$value),
[{ build($_builder, $_state, value.getType(), value); }]>];
let extraClassDeclaration = [{
}];
let builders = [
- OpBuilderDAG<(ins "Value":$memrefOrTensor, "int64_t":$index)>,
- OpBuilderDAG<(ins "Value":$memrefOrTensor, "Value":$index)>
+ OpBuilder<(ins "Value":$memrefOrTensor, "int64_t":$index)>,
+ OpBuilder<(ins "Value":$memrefOrTensor, "Value":$index)>
];
let extraClassDeclaration = [{
let results = (outs AnyType:$result);
let builders = [
- OpBuilderDAG<(ins "Value":$memref, CArg<"ValueRange", "{}">:$indices), [{
+ OpBuilder<(ins "Value":$memref, CArg<"ValueRange", "{}">:$indices), [{
auto memrefType = memref.getType().cast<MemRefType>();
$_state.addOperands(memref);
$_state.addOperands(indices);
let builders = [
// Build a ReinterpretCastOp with mixed static and dynamic entries.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"OpFoldResult":$offset, "ArrayRef<OpFoldResult>":$sizes,
"ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a ReinterpretCastOp with static entries.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"int64_t":$offset, "ArrayRef<int64_t>":$sizes,
"ArrayRef<int64_t>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a ReinterpretCastOp with dynamic entries.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"Value":$offset, "ValueRange":$sizes,
"ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
);
let results = (outs AnyRankedOrUnrankedMemRef:$result);
- let builders = [OpBuilderDAG<
+ let builders = [OpBuilder<
(ins "MemRefType":$resultType, "Value":$operand, "Value":$shape), [{
$_state.addOperands(operand);
$_state.addOperands(shape);
let verifier = ?;
let builders = [
- OpBuilderDAG<(ins "Value":$tensor), [{
+ OpBuilder<(ins "Value":$tensor), [{
auto indexType = $_builder.getIndexType();
build($_builder, $_state, indexType, tensor);
}]>];
let arguments = (ins Variadic<AnyType>:$operands);
let builders = [
- OpBuilderDAG<(ins),
+ OpBuilder<(ins),
[{ build($_builder, $_state, llvm::None); }]>];
let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?";
let results = (outs AnyType:$result);
let builders = [
- OpBuilderDAG<(ins "Value":$condition, "Value":$trueValue,
+ OpBuilder<(ins "Value":$condition, "Value":$trueValue,
"Value":$falseValue), [{
$_state.addOperands({condition, trueValue, falseValue});
$_state.addTypes(trueValue.getType());
let results = (outs SignlessIntegerLike);
let builders = [
- OpBuilderDAG<(ins "Value":$value, "Type":$destType), [{
+ OpBuilder<(ins "Value":$value, "Type":$destType), [{
$_state.addOperands(value);
$_state.addTypes(destType);
}]>];
let results = (outs AnyTypeOf<[AnyVector, AnyStaticShapeTensor]>:$aggregate);
let builders = [
- OpBuilderDAG<(ins "Value":$element, "Type":$aggregateType),
+ OpBuilder<(ins "Value":$element, "Type":$aggregateType),
[{ build($_builder, $_state, aggregateType, element); }]>];
let hasFolder = 1;
Variadic<Index>:$indices);
let builders = [
- OpBuilderDAG<(ins "Value":$valueToStore, "Value":$memref), [{
+ OpBuilder<(ins "Value":$valueToStore, "Value":$memref), [{
$_state.addOperands(valueToStore);
$_state.addOperands(memref);
}]>];
let builders = [
// Build a SubViewOp with mixed static and dynamic entries and custom
// result type. If the type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<OpFoldResult>":$offsets,
+ OpBuilder<(ins "Value":$source, "ArrayRef<OpFoldResult>":$offsets,
"ArrayRef<OpFoldResult>":$sizes, "ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubViewOp with mixed static and dynamic entries and inferred
// result type.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"ArrayRef<OpFoldResult>":$offsets, "ArrayRef<OpFoldResult>":$sizes,
"ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubViewOp with static entries and custom result type. If the
// type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<int64_t>":$offsets,
+ OpBuilder<(ins "Value":$source, "ArrayRef<int64_t>":$offsets,
"ArrayRef<int64_t>":$sizes, "ArrayRef<int64_t>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubViewOp with static entries and inferred result type.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"ArrayRef<int64_t>":$offsets, "ArrayRef<int64_t>":$sizes,
"ArrayRef<int64_t>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubViewOp with dynamic entries and custom result type. If the
// type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "Value":$source, "ValueRange":$offsets,
+ OpBuilder<(ins "Value":$source, "ValueRange":$offsets,
"ValueRange":$sizes, "ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubViewOp with dynamic entries and inferred result type.
- OpBuilderDAG<(ins "MemRefType":$resultType, "Value":$source,
+ OpBuilder<(ins "MemRefType":$resultType, "Value":$source,
"ValueRange":$offsets, "ValueRange":$sizes, "ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
let builders = [
// Build a SubTensorOp with mixed static and dynamic entries and inferred
// result type.
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<OpFoldResult>":$offsets,
+ OpBuilder<(ins "Value":$source, "ArrayRef<OpFoldResult>":$offsets,
"ArrayRef<OpFoldResult>":$sizes, "ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubTensorOp with mixed static and dynamic entries and custom
// result type. If the type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "RankedTensorType":$resultType, "Value":$source,
+ OpBuilder<(ins "RankedTensorType":$resultType, "Value":$source,
"ArrayRef<OpFoldResult>":$offsets, "ArrayRef<OpFoldResult>":$sizes,
"ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubTensorOp with dynamic entries and custom result type. If the
// type passed is nullptr, it is inferred.
- OpBuilderDAG<(ins "Value":$source, "ValueRange":$offsets,
+ OpBuilder<(ins "Value":$source, "ValueRange":$offsets,
"ValueRange":$sizes, "ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubTensorOp with dynamic entries and inferred result type.
- OpBuilderDAG<(ins "RankedTensorType":$resultType, "Value":$source,
+ OpBuilder<(ins "RankedTensorType":$resultType, "Value":$source,
"ValueRange":$offsets, "ValueRange":$sizes, "ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
let builders = [
// Build a SubTensorInsertOp with mixed static and dynamic entries.
- OpBuilderDAG<(ins "Value":$source, "Value":$dest,
+ OpBuilder<(ins "Value":$source, "Value":$dest,
"ArrayRef<OpFoldResult>":$offsets, "ArrayRef<OpFoldResult>":$sizes,
"ArrayRef<OpFoldResult>":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>,
// Build a SubTensorInsertOp with dynamic entries.
- OpBuilderDAG<(ins "Value":$source, "Value":$dest,
+ OpBuilder<(ins "Value":$source, "Value":$dest,
"ValueRange":$offsets, "ValueRange":$sizes, "ValueRange":$strides,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>
];
let verifier = ?;
let builders = [
- OpBuilderDAG<(ins "Value":$memref), [{
+ OpBuilder<(ins "Value":$memref), [{
$_state.addOperands(memref);
$_state.addTypes(getTensorTypeFromMemRefType(memref.getType()));
}]>];
}];
let builders = [
- OpBuilderDAG<(ins "Value":$in, "AffineMapAttr":$permutation,
+ OpBuilder<(ins "Value":$in, "AffineMapAttr":$permutation,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
let extraClassDeclaration = [{
let results = (outs SignlessIntegerLike);
let builders = [
- OpBuilderDAG<(ins "Value":$value, "Type":$destType), [{
+ OpBuilder<(ins "Value":$value, "Type":$destType), [{
$_state.addOperands(value);
$_state.addTypes(destType);
}]>];
let results = (outs SignlessIntegerLike);
let builders = [
- OpBuilderDAG<(ins "Value":$value, "Type":$destType), [{
+ OpBuilder<(ins "Value":$value, "Type":$destType), [{
$_state.addOperands(value);
$_state.addTypes(destType);
}]>];
let assemblyFormat = "$tensor `[` $indices `]` attr-dict `:` type($tensor)";
let builders = [
- OpBuilderDAG<(ins "Value":$tensor, CArg<"ValueRange", "{}">:$indices), [{
+ OpBuilder<(ins "Value":$tensor, CArg<"ValueRange", "{}">:$indices), [{
auto resType = tensor.getType().cast<ShapedType>().getElementType();
build($_builder, $_state, resType, tensor, indices);
}]>];
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<(ins "Type":$elementType, "ValueRange":$elements)>,
+ OpBuilder<(ins "Type":$elementType, "ValueRange":$elements)>,
// Special case builder for when `elements` has size >=1.
- OpBuilderDAG<(ins "ValueRange":$elements)>
+ OpBuilder<(ins "ValueRange":$elements)>
];
let hasCanonicalizer = 1;
let builders = [
// Build op and populate its body per callback function.
- OpBuilderDAG<(ins "Type":$resultTy, "ValueRange":$dynamicExtents,
+ OpBuilder<(ins "Type":$resultTy, "ValueRange":$dynamicExtents,
"function_ref<void(OpBuilder &, Location, ValueRange)>")>,
];
let assemblyFormat = "$value attr-dict `:` type($value)";
// Dummy builder to appease code in templated ensureTerminator that
// GenerateOp's auto-generated parser calls.
- let builders = [OpBuilderDAG<(ins), [{ /* nothing to do */ }]>];
+ let builders = [OpBuilder<(ins), [{ /* nothing to do */ }]>];
let verifier = ?;
}
// This builder is called on all convolution operators except for TransposeConv,
// which has specialized output shape semantics. The builder also defines the
// bitwidth of the output given the bit width of the input & weight content.
-def Tosa_ConvOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_ConvOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input, "Value":$weight, "Value":$bias,
"ArrayAttr":$pad, "ArrayAttr":$stride, "ArrayAttr":$dilation),
[{
}]>;
// Handles tosa.transpose_conv2d which has an outpad and output shape attribute.
-def Tosa_TransConvOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_TransConvOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input, "Value":$weight, "Value":$bias,
"ArrayAttr":$outpad, "ArrayAttr":$stride, "ArrayAttr":$dilation,
"ArrayAttr":$outputShape),
// The tosa.fully_connected op has its own builder as it does not have
// strides/dilation/padding.
-def Tosa_FCOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_FCOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input, "Value":$weight, "Value":$bias),
[{
buildFCOpWithQuantInfo($_builder, $_state, outputType,
// op must be constructed where the weight is not a constant. In this case,
// the fully_connected op must be expressed using matmul.
// TODO: Add link to the leglization document explaining this.
-def Tosa_MatMulOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_MatMulOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$a, "Value":$b),
[{
buildMatMulOpWithQuantInfo($_builder, $_state, outputType,
// Both the tosa.avg_pool2d and unary ops use the same
// UnaruOpQuantizationAttr but the avg_pool operator has its own builder as it
// has additional parameters not part of the unary ops.
-def Tosa_AvgPool2dOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_AvgPool2dOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input, "ArrayAttr":$kernel,
"ArrayAttr":$stride, "ArrayAttr":$pad),
[{
// This builder is called on single-parameter unary operators that have a scale
// relationship between their input and output, expressed by the
// UnaryOpQuantizationAttr.
-def Tosa_UnaryOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_UnaryOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input),
[{
buildUnaryOpWithQuantInfo($_builder, $_state, outputType, input);
// This builder is called on the TOSA pad operator that needs to create its own
// OptionalAttr quantization_attr parameter to scale the padding values
// correctly.
-def Tosa_PadOpQuantInfoBuilder : OpBuilderDAG<
+def Tosa_PadOpQuantInfoBuilder : OpBuilder<
(ins "Type":$outputType, "Value":$input, "Value":$paddings),
[{
buildPadOpWithQuantInfo($_builder, $_state, outputType,
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, "Value":$acc,
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs, "Value":$acc,
"ArrayAttr":$indexingMaps, "ArrayAttr":$iteratorTypes)>,
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, "Value":$acc,
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs, "Value":$acc,
"ArrayRef<ArrayRef<AffineExpr>>":$indexingExprs,
"ArrayRef<StringRef>":$iteratorTypes)>
];
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$v1, "Value":$v2, "ArrayRef<int64_t>")>
+ OpBuilder<(ins "Value":$v1, "Value":$v2, "ArrayRef<int64_t>")>
];
let extraClassDeclaration = [{
static StringRef getMaskAttrName() { return "mask"; }
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "int64_t":$position)>,
- OpBuilderDAG<(ins "Value":$source, "Value":$position)>
+ OpBuilder<(ins "Value":$source, "int64_t":$position)>,
+ OpBuilder<(ins "Value":$source, "Value":$position)>
];
let extraClassDeclaration = [{
VectorType getVectorType() {
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<int64_t>":$position)>,
+ OpBuilder<(ins "Value":$source, "ArrayRef<int64_t>":$position)>,
// Convenience builder which assumes the values in `position` are defined by
// ConstantIndexOp.
- OpBuilderDAG<(ins "Value":$source, "ValueRange":$position)>
+ OpBuilder<(ins "Value":$source, "ValueRange":$position)>
];
let extraClassDeclaration = [{
static StringRef getPositionAttrName() { return "position"; }
```
}];
let builders = [
- OpBuilderDAG<(ins "TupleType":$tupleType, "Value":$vector,
+ OpBuilder<(ins "TupleType":$tupleType, "Value":$vector,
"ArrayRef<int64_t>":$sizes, "ArrayRef<int64_t>":$strides)>
];
let extraClassDeclaration = [{
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$vector, "ValueRange":$ids,
+ OpBuilder<(ins "Value":$vector, "ValueRange":$ids,
"ArrayRef<int64_t>":$multiplicity,
"AffineMap":$map)>];
let extraClassDeclaration = [{
let verifier = ?;
let assemblyFormat = "$lhs `,` $rhs `,` $acc attr-dict `:` type($lhs)";
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, "Value":$acc),
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs, "Value":$acc),
[{build($_builder, $_state, lhs.getType(), lhs, rhs, acc);}]>
];
let extraClassDeclaration = [{
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "Value":$dest, "int64_t":$position)>,
- OpBuilderDAG<(ins "Value":$source, "Value":$dest, "Value":$position)>
+ OpBuilder<(ins "Value":$source, "Value":$dest, "int64_t":$position)>,
+ OpBuilder<(ins "Value":$source, "Value":$dest, "Value":$position)>
];
let extraClassDeclaration = [{
Type getSourceType() { return source().getType(); }
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "Value":$dest,
+ OpBuilder<(ins "Value":$source, "Value":$dest,
"ArrayRef<int64_t>":$position)>,
// Convenience builder which assumes all values are constant indices.
- OpBuilderDAG<(ins "Value":$source, "Value":$dest, "ValueRange":$position)>
+ OpBuilder<(ins "Value":$source, "Value":$dest, "ValueRange":$position)>
];
let extraClassDeclaration = [{
static StringRef getPositionAttrName() { return "position"; }
into vector<64x4x32xf32>
```
}];
- let builders = [OpBuilderDAG<(ins "Value":$vector, "Value":$dest,
+ let builders = [OpBuilder<(ins "Value":$vector, "Value":$dest,
"ValueRange":$ids)>];
let extraClassDeclaration = [{
VectorType getSourceVectorType() {
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "Value":$dest,
+ OpBuilder<(ins "Value":$source, "Value":$dest,
"ArrayRef<int64_t>":$offsets, "ArrayRef<int64_t>":$strides)>
];
let extraClassDeclaration = [{
}];
let builders = [
// Build an op without mask, use the type of `acc` as the return type.
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, "Value":$acc)>
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs, "Value":$acc)>
];
let extraClassDeclaration = [{
VectorType getOperandVectorTypeLHS() {
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$source, "ArrayRef<int64_t>":$offsets,
+ OpBuilder<(ins "Value":$source, "ArrayRef<int64_t>":$offsets,
"ArrayRef<int64_t>":$sizes, "ArrayRef<int64_t>":$strides)>
];
let extraClassDeclaration = [{
let builders = [
// Builder that sets padding to zero.
- OpBuilderDAG<(ins "VectorType":$vector, "Value":$source,
+ OpBuilder<(ins "VectorType":$vector, "Value":$source,
"ValueRange":$indices, "AffineMap":$permutationMap,
CArg<"ArrayRef<bool>", "{}">:$maybeMasked)>,
// Builder that sets padding to 'getMinorIdentityMap'.
- OpBuilderDAG<(ins "VectorType":$vector, "Value":$source,
+ OpBuilder<(ins "VectorType":$vector, "Value":$source,
"ValueRange":$indices, "Value":$padding,
CArg<"ArrayRef<bool>", "{}">:$maybeMasked)>,
// Builder that sets permutation map (resp. padding) to
// 'getMinorIdentityMap' (resp. zero).
- OpBuilderDAG<(ins "VectorType":$vector, "Value":$source,
+ OpBuilder<(ins "VectorType":$vector, "Value":$source,
"ValueRange":$indices, CArg<"ArrayRef<bool>", "{}">:$maybeMasked)>
];
let builders = [
// Builder that sets permutation map to 'getMinorIdentityMap'.
- OpBuilderDAG<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
+ OpBuilder<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
CArg<"ArrayRef<bool>", "{}">:$maybeMasked)>,
- OpBuilderDAG<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
+ OpBuilder<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
"AffineMap":$permutationMap)>,
- OpBuilderDAG<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
+ OpBuilder<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
"AffineMapAttr":$permutationMap, "ArrayAttr":$masked)>,
- OpBuilderDAG<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
+ OpBuilder<(ins "Value":$vector, "Value":$source, "ValueRange":$indices,
"AffineMap":$permutationMap, "ArrayAttr":$masked)>,
];
/// Build the canonical memRefType with a single vector.
/// E.g. memref<4 x 5 x vector<6 x f32>> -> memref<vector<4 x 5 x 6 x f32>>.
- let builders = [OpBuilderDAG<(ins "Value":$source)>];
+ let builders = [OpBuilder<(ins "Value":$source)>];
let extraClassDeclaration = [{
MemRefType getMemRefType() {
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$vector, "ArrayRef<int64_t>":$transp)>
+ OpBuilder<(ins "Value":$vector, "ArrayRef<int64_t>":$transp)>
];
let extraClassDeclaration = [{
VectorType getVectorType() {
```
}];
let builders = [
- OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, "unsigned":$lhsRows,
+ OpBuilder<(ins "Value":$lhs, "Value":$rhs, "unsigned":$lhsRows,
"unsigned":$lhsColumns, "unsigned":$rhsColumns),
[{
$_state.addOperands({lhs, rhs});
OptionalAttr<StrAttr>:$sym_visibility);
let regions = (region AnyRegion:$body);
- let builders = [OpBuilderDAG<(ins
+ let builders = [OpBuilder<(ins
"StringRef":$name, "FunctionType":$type,
CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs,
CArg<"ArrayRef<DictionaryAttr>", "{}">:$argAttrs)
let regions = (region SizedRegion<1>:$body);
let assemblyFormat = "($sym_name^)? attr-dict-with-keyword $body";
- let builders = [OpBuilderDAG<(ins CArg<"Optional<StringRef>", "{}">:$name)>];
+ let builders = [OpBuilder<(ins CArg<"Optional<StringRef>", "{}">:$name)>];
let extraClassDeclaration = [{
/// Construct a module from the given location with an optional name.
static ModuleOp create(Location loc, Optional<StringRef> name = llvm::None);
// type. For example, the following signature specification
//
// ```
-// OpBuilderDAG<(ins "int":$integerArg, CArg<"float", "3.0f">:$floatArg)>
+// OpBuilder<(ins "int":$integerArg, CArg<"float", "3.0f">:$floatArg)>
// ```
//
// has an integer parameter and a float parameter with a default value.
// If an empty string is passed in for `body`, then *only* the builder
// declaration will be generated; this provides a way to define complicated
// builders entirely in C++.
-class OpBuilderDAG<dag p, code b = ""> {
+class OpBuilder<dag p, code b = ""> {
dag dagParams = p;
code body = b;
}
// ValueRange operands,
// ArrayRef<NamedAttribute> attributes);
// ```
- list<OpBuilderDAG> builders = ?;
+ list<OpBuilder> builders = ?;
// Avoid generating default build functions. Custom builders must be
// provided.
let description = [{
The "test.op_funcref" is a test op with a reference to a function symbol.
}];
- let builders = [OpBuilderDAG<(ins "FuncOp":$function)>];
+ let builders = [OpBuilder<(ins "FuncOp":$function)>];
}
// Pattern add the argument plus a increasing static number hidden in
// We will use this op in a nested result pattern, where we cannot deduce the
// result type. So need to provide a builder not requiring result types.
let builders = [
- OpBuilderDAG<(ins "IntegerAttr":$count),
+ OpBuilder<(ins "IntegerAttr":$count),
[{
auto i32Type = $_builder.getIntegerType(32);
$_state.addTypes(i32Type); // $output1
def IllegalOpTerminator : TEST_Op<"illegal_op_terminator", [Terminator]>;
def IllegalOpWithRegion : TEST_Op<"illegal_op_with_region"> {
let skipDefaultBuilders = 1;
- let builders = [OpBuilderDAG<(ins),
+ let builders = [OpBuilder<(ins),
[{
Region *bodyRegion = $_state.addRegion();
OpBuilder::InsertionGuard g($_builder);
def TestRegionBuilderOp : TEST_Op<"region_builder">;
def TestReturnOp : TEST_Op<"return", [ReturnLike, Terminator]> {
let arguments = (ins Variadic<AnyType>);
- let builders = [OpBuilderDAG<(ins),
+ let builders = [OpBuilder<(ins),
[{ build($_builder, $_state, {}); }]>
];
}
let assemblyFormat = [{
$result `:` type($result) attr-dict
}];
- let builders = [OpBuilderDAG<(ins),
+ let builders = [OpBuilder<(ins),
[{ build($_builder, $_state, {}); }]>
];
}
// Test attribute builder
// ODS-LABEL: def Test7Op
-// ODS: OpBuilderDAG<
+// ODS: OpBuilder<
// ODS: (ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
// ODS: "ValueRange":$outputs, "Attribute":$attr_a, "Attribute":$attr_b)
// ODS: $_state.addAttribute("attr_a", attr_a);
AnyRegion:$someRegion,
VariadicRegion<AnyRegion>:$someRegions
);
- let builders = [OpBuilderDAG<(ins "Value":$val)>,
- OpBuilderDAG<(ins CArg<"int", "0">:$integer)>];
+ let builders = [OpBuilder<(ins "Value":$val)>,
+ OpBuilder<(ins CArg<"int", "0">:$integer)>];
let parser = [{ foo }];
let printer = [{ bar }];
let verifier = [{ baz }];
def NS_SkipDefaultBuildersOp : NS_Op<"skip_default_builders", []> {
let skipDefaultBuilders = 1;
- let builders = [OpBuilderDAG<(ins "Value":$val)>];
+ let builders = [OpBuilder<(ins "Value":$val)>];
}
// CHECK-LABEL: NS::SkipDefaultBuildersOp declarations
// ERROR1: error: expected 'ins'
def OpInsMissing : Op<Test_Dialect, "ins_missing"> {
let builders = [
- OpBuilderDAG<(outs)>
+ OpBuilder<(outs)>
];
}
#endif
// ERROR2: error: expected an argument with default value after other arguments with default values
def OpDefaultValueNotTrailing : Op<Test_Dialect, "default_value"> {
let builders = [
- OpBuilderDAG<(ins CArg<"int", "42">, "int")>
+ OpBuilder<(ins CArg<"int", "42">, "int")>
];
}
#endif
// ERROR3: error: expected an argument with default value after other arguments with default values
def OpDefaultValueNotTrailing : Op<Test_Dialect, "default_value"> {
let builders = [
- OpBuilderDAG<(ins CArg<"int", "42">, CArg<"int">)>
+ OpBuilder<(ins CArg<"int", "42">, CArg<"int">)>
];
}
#endif
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<
+ OpBuilder<
(ins "ValueRange":$inputs, "ValueRange":$outputs),
[{{
$_state.addOperands(inputs);
TypeRange(inputs),
TypeRange(outputs)/*, TODO: support captures*/);
}]>,
- OpBuilderDAG<
+ OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs),
[{{
TypeRange(inputs),
TypeRange(outputs)/*, TODO: support captures*/);
}]>,
- OpBuilderDAG<
+ OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
[{{
std::string attrStmtsList = llvm::join(attrStmts, "\n");
const char *builderFmt = R"FMT(
- , OpBuilderDAG<
+ , OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs, {1}),
[{{
let skipDefaultBuilders = 1;
let builders = [
- OpBuilderDAG<
+ OpBuilder<
(ins "ValueRange":$inputs, "ValueRange":$outputs),
[{{
$_state.addOperands(inputs);
TypeRange(inputs),
TypeRange(outputs)/*, TODO: support captures*/);
}]>,
- OpBuilderDAG<
+ OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$inputs,
"ValueRange":$outputs),
[{{
TypeRange(inputs),
TypeRange(outputs)/*, TODO: support captures*/);
}]>,
- OpBuilderDAG<
+ OpBuilder<
(ins "TypeRange":$resultTensorTypes, "ValueRange":$operands,
CArg<"ArrayRef<NamedAttribute>", "{{}">:$attributes),
[{{