[all-commits] [llvm/llvm-project] 122e68: [mlir] do not elide dialect prefix for ops with do...

ftynse via All-commits all-commits at lists.llvm.org
Fri May 20 03:55:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 122e685878991b63e414733094e9876e715d08e0
      https://github.com/llvm/llvm-project/commit/122e685878991b63e414733094e9876e715d08e0
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-05-20 (Fri, 20 May 2022)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [mlir] do not elide dialect prefix for ops with dots in the name

For the hypothetical "a.b.c" op printed within a region that declares "a" as
the default dialect, MLIR would currently elide the "a." prefix and only print
"b.c". However, this becomes ambiguous while parsing as "b.c" may be exist as
the "c" op in the "b" dialect. If it does not, the parsing currently fails. Do
not elide the default dialect if the op name contains further dots to avoid the
ambiguity.

See https://discourse.llvm.org/t/dropping-dialect-prefix-for-ops-with-multiple-dots-in-the-name/62562

Reviewed By: rriddle

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




More information about the All-commits mailing list