[all-commits] [llvm/llvm-project] 0d18c2: [mlir][ods] Allow custom directives to anchor opti...

Jeff Niu via All-commits all-commits at lists.llvm.org
Wed Aug 30 20:21:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d18c2d90f8f69e6517a8851b94c43be7b87575f
      https://github.com/llvm/llvm-project/commit/0d18c2d90f8f69e6517a8851b94c43be7b87575f
  Author: Mogball <jeff at modular.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M mlir/test/mlir-tblgen/op-format-invalid.td
    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:
  -----------
  [mlir][ods] Allow custom directives to anchor optional groups in op assembly formats

`custom` directives were allowed to anchor optional groups in attribute
and type assembly formats already, but the feature was never extended to
operation assembly formats. This patch adds the feature to op assembly
formats too.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D159243


  Commit: 574e7596e5149c3319dea255b2c45e670ca4711b
      https://github.com/llvm/llvm-project/commit/574e7596e5149c3319dea255b2c45e670ca4711b
  Author: Mogball <jeff at modular.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M mlir/test/mlir-tblgen/attr-or-type-format.td
    M mlir/test/mlir-tblgen/op-format-invalid.td
    M mlir/test/mlir-tblgen/op-format.td
    M mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
    M mlir/tools/mlir-tblgen/FormatGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [mlir][ods] Support using custom directives as first optional group element

This adds support for using a custom directive as the first optional
group element. The first optional group element guards the parsing of
the rest of the optional group. This can be done for custom directives
by expecting the parse function to return an `OptionalParseResult`
instead of a `ParseResult`.

Depends on D159243

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D159244


Compare: https://github.com/llvm/llvm-project/compare/9c99e9fd684f...574e7596e514


More information about the All-commits mailing list