[Mlir-commits] [mlir] 6ec9fd2 - [mlir:Standard][NFC] Remove the dead Arithmetic op classes from Ops.td

River Riddle llvmlistbot at llvm.org
Mon Jan 31 12:53:53 PST 2022


Author: River Riddle
Date: 2022-01-31T12:53:29-08:00
New Revision: 6ec9fd20bd77b145f5e3e1cc45fa76ce5b24b2a4

URL: https://github.com/llvm/llvm-project/commit/6ec9fd20bd77b145f5e3e1cc45fa76ce5b24b2a4
DIFF: https://github.com/llvm/llvm-project/commit/6ec9fd20bd77b145f5e3e1cc45fa76ce5b24b2a4.diff

LOG: [mlir:Standard][NFC] Remove the dead Arithmetic op classes from Ops.td

These were dead after the arithmetic operations moved from Standard to the Arithmetic dialect.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/StandardOps/IR/Ops.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
index 0ca4d8b75e64..14f1c63b09ff 100644
--- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
+++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
@@ -44,111 +44,6 @@ class Std_Op<string mnemonic, list<Trait> traits = []> :
   let parser = [{ return ::parse$cppClass(parser, result); }];
 }
 
-// Base class for unary ops. Requires single operand and result. Individual
-// classes will have `operand` accessor.
-class UnaryOp<string mnemonic, list<Trait> traits = []> :
-    Op<StandardOps_Dialect, mnemonic, !listconcat(traits, [NoSideEffect])> {
-  let results = (outs AnyType);
-  let printer = [{
-    return printStandardUnaryOp(this->getOperation(), p);
-  }];
-}
-
-class UnaryOpSameOperandAndResultType<string mnemonic,
-                                      list<Trait> traits = []> :
-    UnaryOp<mnemonic, !listconcat(traits, [SameOperandsAndResultType])> {
-  let parser = [{
-    return impl::parseOneResultSameOperandTypeOp(parser, result);
-  }];
-}
-
-class FloatUnaryOp<string mnemonic, list<Trait> traits = []> :
-    UnaryOpSameOperandAndResultType<mnemonic, traits # [
-    DeclareOpInterfaceMethods<VectorUnrollOpInterface>] #
-    ElementwiseMappable.traits>, Arguments<(ins FloatLike:$operand)>;
-
-// Base class for standard arithmetic operations.  Requires operands and
-// results to be of the same type, but does not constrain them to specific
-// types.
-class ArithmeticOp<string mnemonic, list<Trait> traits = []> :
-    Op<StandardOps_Dialect, mnemonic, traits # [NoSideEffect,
-    SameOperandsAndResultType,
-    DeclareOpInterfaceMethods<VectorUnrollOpInterface>] #
-    ElementwiseMappable.traits> {
-
-  let results = (outs AnyType:$result);
-
-  let parser = [{
-    return impl::parseOneResultSameOperandTypeOp(parser, result);
-  }];
-}
-
-// Base class for standard binary arithmetic operations.
-class ArithmeticBinaryOp<string mnemonic, list<Trait> traits = []> :
-    ArithmeticOp<mnemonic, traits> {
-
-  let parser = [{
-    return impl::parseOneResultSameOperandTypeOp(parser, result);
-  }];
-}
-
-// Base class for standard ternary arithmetic operations.
-class ArithmeticTernaryOp<string mnemonic, list<Trait> traits = []> :
-    ArithmeticOp<mnemonic, traits> {
-
-  let parser = [{
-    return impl::parseOneResultSameOperandTypeOp(parser, result);
-  }];
-
-  let printer = [{
-    return printStandardTernaryOp(this->getOperation(), p);
-  }];
-}
-
-// Base class for standard arithmetic operations on integers, vectors and
-// tensors thereof.  This operation takes two operands and returns one result,
-// each of these is required to be of the same type.  This type may be an
-// integer scalar type, a vector whose element type is an integer type, or an
-// integer tensor.  The custom assembly form of the operation is as follows
-//
-//     <op>i %0, %1 : i32
-//
-class IntBinaryOp<string mnemonic, list<Trait> traits = []> :
-    ArithmeticBinaryOp<mnemonic,
-      !listconcat(traits,
-                  [DeclareOpInterfaceMethods<VectorUnrollOpInterface>])>,
-    Arguments<(ins SignlessIntegerLike:$lhs, SignlessIntegerLike:$rhs)>;
-
-// Base class for standard arithmetic binary operations on floats, vectors and
-// tensors thereof.  This operation has two operands and returns one result,
-// each of these is required to be of the same type.  This type may be a
-// floating point scalar type, a vector whose element type is a floating point
-// type, or a floating point tensor.  The custom assembly form of the operation
-// is as follows
-//
-//     <op>f %0, %1 : f32
-//
-class FloatBinaryOp<string mnemonic, list<Trait> traits = []> :
-    ArithmeticBinaryOp<mnemonic,
-      !listconcat(traits,
-                  [DeclareOpInterfaceMethods<VectorUnrollOpInterface>])>,
-    Arguments<(ins FloatLike:$lhs, FloatLike:$rhs)>;
-
-// Base class for standard arithmetic ternary operations on floats, vectors and
-// tensors thereof.  This operation has three operands and returns one result,
-// each of these is required to be of the same type.  This type may be a
-// floating point scalar type, a vector whose element type is a floating point
-// type, or a floating point tensor.  The custom assembly form of the operation
-// is as follows
-//
-//     <op> %0, %1, %2 : f32
-//
-class FloatTernaryOp<string mnemonic, list<Trait> traits = []> :
-    ArithmeticTernaryOp<mnemonic,
-      !listconcat(traits,
-                  [DeclareOpInterfaceMethods<VectorUnrollOpInterface>])>,
-    Arguments<(ins FloatLike:$a, FloatLike:$b, FloatLike:$c)>;
-
 //===----------------------------------------------------------------------===//
 // AssertOp
 //===----------------------------------------------------------------------===//


        


More information about the Mlir-commits mailing list