Rename Float/Integer to AnyFloat/AnyInteger
authorGeoffrey Martin-Noble <gcmn@google.com>
Thu, 23 May 2019 21:41:32 +0000 (14:41 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 02:58:54 +0000 (19:58 -0700)
    This emphasizes that it is potentially less constrained than you might desire (especially dialects will frequently not support all bit widths), and better matches the other type names, especially the container types.

--

PiperOrigin-RevId: 249718409

mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td
mlir/include/mlir/IR/OpBase.td

index d000946..cc51aa6 100644 (file)
@@ -39,13 +39,13 @@ def quant_QuantizedType :
 // A primitive type that can represent a real value. This is either a
 // floating point value or a quantized type.
 def quant_RealPrimitiveType :
-    Type<Or<[Float.predicate, quant_QuantizedType.predicate]>,
+    Type<Or<[AnyFloat.predicate, quant_QuantizedType.predicate]>,
     "real valued primitive (float or quantized type)">;
 
 // A primitive type that can represent a storage value. This is either an
 // integer or quantized type.
 def quant_StoragePrimitiveType :
-    Type<Or<[Integer.predicate, quant_QuantizedType.predicate]>,
+    Type<Or<[AnyInteger.predicate, quant_QuantizedType.predicate]>,
     "quantized storage primitive (integer or quantized type)">;
 
 // A primitive or container of RealPrimitiveType.
index 2d4bf2d..6cffc49 100644 (file)
@@ -283,7 +283,7 @@ class AnyTypeOf<list<Type> allowedTypes, string description = ""> : Type<
 
 // Integer types.
 // Any integer type irrespective of its width.
-def Integer : Type<CPred<"$_self.isa<IntegerType>()">, "integer">;
+def AnyInteger : Type<CPred<"$_self.isa<IntegerType>()">, "integer">;
 
 // Index type.
 def Index : Type<CPred<"$_self.isa<IndexType>()">, "index">;
@@ -309,7 +309,7 @@ def I64 : I<64>;
 // Floating point types.
 
 // Any float type irrespective of its width.
-def Float : Type<CPred<"$_self.isa<FloatType>()">, "floating-point">;
+def AnyFloat : Type<CPred<"$_self.isa<FloatType>()">, "floating-point">;
 
 // Float type of a specific width.
 class F<int width>
@@ -438,13 +438,13 @@ class TupleOf<Type t> :
 
 // Type constraint for integer-like types: integers, indices, vectors of
 // integers, tensors of integers.
-def IntegerLike : TypeConstraint<Or<[Integer.predicate, Index.predicate,
-        VectorOf<[Integer]>.predicate, TensorOf<[Integer]>.predicate]>,
+def IntegerLike : TypeConstraint<Or<[AnyInteger.predicate, Index.predicate,
+        VectorOf<[AnyInteger]>.predicate, TensorOf<[AnyInteger]>.predicate]>,
     "integer-like">;
 
 // Type constraint for float-like types: floats, vectors or tensors thereof.
-def FloatLike : TypeConstraint<Or<[Float.predicate,
-        VectorOf<[Float]>.predicate, TensorOf<[Float]>.predicate]>,
+def FloatLike : TypeConstraint<Or<[AnyFloat.predicate,
+        VectorOf<[AnyFloat]>.predicate, TensorOf<[AnyFloat]>.predicate]>,
     "floating-point-like">;