[all-commits] [llvm/llvm-project] 6b043e: [MLIR] Fix genTypeInterfaceMethods() to work corre...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Tue Dec 1 13:37:28 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b043ecdb71bb0354cbd64d766cc21b7d20dca84
      https://github.com/llvm/llvm-project/commit/6b043ecdb71bb0354cbd64d766cc21b7d20dca84
  Author: Rahul Joshi <jurahul at google.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M mlir/include/mlir/Interfaces/InferTypeOpInterface.td
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [MLIR] Fix genTypeInterfaceMethods() to work correctly with InferTypeOpInterface

- Change InferTypeOpInterface::inferResultTypes to use fully qualified types matching
  the ones generated by genTypeInterfaceMethods, so the redundancy can be detected.
- Move genTypeInterfaceMethods() before genOpInterfaceMethods() so that the
  inferResultTypes method generated by genTypeInterfaceMethods() takes precedence
  over the declaration that might be generated by genOpInterfaceMethods()
- Modified an op in the test dialect to exercise this (the modified op would fail to
  generate valid C++ code due to duplicate inferResultTypes methods).

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




More information about the All-commits mailing list