[all-commits] [llvm/llvm-project] 44b3cf: add prop-dict support for custom directive for mli...

drazi via All-commits all-commits at lists.llvm.org
Fri Jan 5 03:37:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44b3cf46e992b76a9e188367922a1184437dfa4c
      https://github.com/llvm/llvm-project/commit/44b3cf46e992b76a9e188367922a1184437dfa4c
  Author: drazi <fengxie83 at gmail.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M mlir/test/mlir-tblgen/op-format-spec.td
    M mlir/test/mlir-tblgen/op-format.td
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  add prop-dict support for custom directive for mlir-tblgen (#77061)

According to
https://mlir.llvm.org/docs/DefiningDialects/Operations/#custom-directives,
custom directive supports attr-dict

> attr-dict Directive: NamedAttrList &

But it doesn't support prop-dict which is introduced into MLIR recently.
It's useful to have tblgen support prop-dict like attr-dict. This PR
enable tblgen to support prop-dict

```bash
error: only variables and types may be used as parameters to a custom directive
   ... custom<Print>(prop-dict)
```

Co-authored-by: Fung Xie <ftse at nvidia.com>




More information about the All-commits mailing list