From 6ec9fd20bd77b145f5e3e1cc45fa76ce5b24b2a4 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Mon, 31 Jan 2022 11:32:17 -0800 Subject: [PATCH] [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. --- mlir/include/mlir/Dialect/StandardOps/IR/Ops.td | 105 ------------------------ 1 file changed, 105 deletions(-) diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td index 0ca4d8b..14f1c63 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 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 traits = []> : - Op { - let results = (outs AnyType); - let printer = [{ - return printStandardUnaryOp(this->getOperation(), p); - }]; -} - -class UnaryOpSameOperandAndResultType traits = []> : - UnaryOp { - let parser = [{ - return impl::parseOneResultSameOperandTypeOp(parser, result); - }]; -} - -class FloatUnaryOp traits = []> : - UnaryOpSameOperandAndResultType] # - 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 traits = []> : - Op] # - ElementwiseMappable.traits> { - - let results = (outs AnyType:$result); - - let parser = [{ - return impl::parseOneResultSameOperandTypeOp(parser, result); - }]; -} - -// Base class for standard binary arithmetic operations. -class ArithmeticBinaryOp traits = []> : - ArithmeticOp { - - let parser = [{ - return impl::parseOneResultSameOperandTypeOp(parser, result); - }]; -} - -// Base class for standard ternary arithmetic operations. -class ArithmeticTernaryOp traits = []> : - ArithmeticOp { - - 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 -// -// i %0, %1 : i32 -// -class IntBinaryOp traits = []> : - ArithmeticBinaryOp])>, - 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 -// -// f %0, %1 : f32 -// -class FloatBinaryOp traits = []> : - ArithmeticBinaryOp])>, - 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 -// -// %0, %1, %2 : f32 -// -class FloatTernaryOp traits = []> : - ArithmeticTernaryOp])>, - Arguments<(ins FloatLike:$a, FloatLike:$b, FloatLike:$c)>; - //===----------------------------------------------------------------------===// // AssertOp //===----------------------------------------------------------------------===// -- 2.7.4