[PATCH] D141867: [mlir][vector] Share enums with the transform dialect

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 00:10:48 PST 2023


nicolasvasilache added inline comments.


================
Comment at: mlir/include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td:54
+    (`split_transfers` `=` $split_transfers^)?
+    (`transpose_lowering` `=` $transpose_lowering^)?
+    attr-dict
----------------
qcolombet wrote:
> We have to explicitly list all the fields here to have the proper parsing of the enums.
> 
> This may have an impact on the supported syntax. I.e., I don't know if `attr-dict` allows to put the attributes in whatever order, but if it does, then we lose this ability here.
`attr-dict` allows any order and not enforcing a particular order indeed seems better.

Lookup oilist in the ODS doc, it does what you want here: https://mlir.llvm.org/docs/DefiningDialects/Operations/#directives



================
Comment at: mlir/include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.h:2
+#ifndef VECTOR_TRANSFORMS_ENUMS
+#define VECTOR_TRANSFORMS_ENUMS
+
----------------
qcolombet wrote:
> This file is a work around the fact that tablegen'ed enums header are not guarded.
> I don't know how we want to move forward here.
Just add the include to VectorTransforms.h and avoid a special include file for this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141867/new/

https://reviews.llvm.org/D141867



More information about the llvm-commits mailing list