diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td --- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td @@ -588,11 +588,6 @@ %3 = vector.extract %1[]: vector ``` }]; - let builders = [ - // Convenience builder which assumes the values in `position` are defined by - // ConstantIndexOp. - OpBuilder<(ins "Value":$source, "ValueRange":$position)> - ]; let extraClassDeclaration = [{ VectorType getSourceVectorType() { return ::llvm::cast(getVector().getType()); @@ -709,10 +704,6 @@ $source `,` $dest $position attr-dict `:` type($source) `into` type($dest) }]; - let builders = [ - // Convenience builder which assumes all values are constant indices. - OpBuilder<(ins "Value":$source, "Value":$dest, "ValueRange":$position)> - ]; let extraClassDeclaration = [{ Type getSourceType() { return getSource().getType(); } VectorType getDestVectorType() { diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp --- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp @@ -1126,14 +1126,6 @@ // ExtractOp //===----------------------------------------------------------------------===// -// Convenience builder which assumes the values are constant indices. -void vector::ExtractOp::build(OpBuilder &builder, OperationState &result, - Value source, ValueRange position) { - SmallVector positionConstants = llvm::to_vector(llvm::map_range( - position, [](Value pos) { return getConstantIntValue(pos).value(); })); - build(builder, result, source, positionConstants); -} - LogicalResult ExtractOp::inferReturnTypes(MLIRContext *, std::optional, ExtractOp::Adaptor adaptor, @@ -2274,16 +2266,6 @@ // InsertOp //===----------------------------------------------------------------------===// -// Convenience builder which assumes the values are constant indices. -void InsertOp::build(OpBuilder &builder, OperationState &result, Value source, - Value dest, ValueRange position) { - SmallVector positionConstants = - llvm::to_vector<4>(llvm::map_range(position, [](Value pos) { - return getConstantIntValue(pos).value(); - })); - build(builder, result, source, dest, positionConstants); -} - LogicalResult InsertOp::verify() { ArrayRef position = getPosition(); auto destVectorType = getDestVectorType();