[all-commits] [llvm/llvm-project] a07b42: [mlir][linalg] Fix `SemiFunctionType` custom parsi...

Felix Schneider via All-commits all-commits at lists.llvm.org
Sun Nov 3 06:31:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a07b422e90174430213201d0b4b307f5ed089d3f
      https://github.com/llvm/llvm-project/commit/a07b422e90174430213201d0b4b307f5ed089d3f
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-11-03 (Sun, 03 Nov 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.td
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/TransformOps/Syntax.h
    M mlir/include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.td
    M mlir/lib/Dialect/Linalg/TransformOps/Syntax.cpp
    M mlir/test/Dialect/Linalg/transform-ops-invalid.mlir

  Log Message:
  -----------
  [mlir][linalg] Fix `SemiFunctionType` custom parsing crash on missing `()` (#110365)

The `SemiFunctionType` allows printing/parsing a set of argument and
result types, where there is always exactly one argument type and zero
or more result types. If there are no result types, the argument type
can be written without enclosing parens in the assembly. If there is at
least one result type, the parens are mandatory.

This patch fixes a bug where omitting the parens around the argument
types for a `SemiFunctionType` with non-optional result Types would
crash the parser. It introduces a `bool` argument `resultOptional` to
the parser and printer which, when `false`, correctly enforces the
parens around argument types, otherwise printing an error.

Fix https://github.com/llvm/llvm-project/issues/109128



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list