Add DictionaryAttr to OpBase.td
authorRob Suderman <suderman@google.com>
Mon, 19 Aug 2019 22:56:55 +0000 (15:56 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Mon, 19 Aug 2019 22:57:22 +0000 (15:57 -0700)
PiperOrigin-RevId: 264262369

mlir/include/mlir/IR/OpBase.td

index 1cd6146..fc909c5 100644 (file)
@@ -807,6 +807,13 @@ class I64EnumAttr<string name, string description,
 //===----------------------------------------------------------------------===//
 // Composite attribute kinds
 
+def DictionaryAttr : Attr<CPred<"$_self.isa<DictionaryAttr>()">,
+                          "dictionary of named attribute values"> {
+  let storageType = [{ DictionaryAttr }];
+  let returnType = [{ DictionaryAttr }];
+  let convertFromStorage = "$_self";
+}
+
 class ElementsAttrBase<Pred condition, string description> :
     Attr<condition, description> {
   let storageType = [{ ElementsAttr }];