[all-commits] [llvm/llvm-project] f8a1d6: [mlir][IR] Move MemRefElementTypeInterface to a ne...

River Riddle via All-commits all-commits at lists.llvm.org
Thu Jun 10 17:28:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8a1d652da00ecff448213c58522da5a61d9bc4b
      https://github.com/llvm/llvm-project/commit/f8a1d652da00ecff448213c58522da5a61d9bc4b
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-06-10 (Thu, 10 Jun 2021)

  Changed paths:
    A mlir/include/mlir/IR/BuiltinTypeInterfaces.td
    M mlir/include/mlir/IR/BuiltinTypes.td
    M mlir/include/mlir/IR/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt

  Log Message:
  -----------
  [mlir][IR] Move MemRefElementTypeInterface to a new BuiltinTypeInterfaces file

This allows for using other type interfaces in the builtin dialect, which currently results in a compile time failure (as it generates duplicate interface declarations).


  Commit: c42dd5dbb015afaef99cf876195c474c63c2393e
      https://github.com/llvm/llvm-project/commit/c42dd5dbb015afaef99cf876195c474c63c2393e
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-06-10 (Thu, 10 Jun 2021)

  Changed paths:
    M mlir/include/mlir/IR/BuiltinAttributes.h
    M mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/include/mlir/IR/BuiltinTypes.h
    M mlir/include/mlir/IR/BuiltinTypes.td
    M mlir/include/mlir/IR/CMakeLists.txt
    A mlir/include/mlir/IR/SubElementInterfaces.h
    A mlir/include/mlir/IR/SubElementInterfaces.td
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/lib/IR/BuiltinTypes.cpp
    M mlir/lib/IR/CMakeLists.txt
    A mlir/lib/IR/SubElementInterfaces.cpp
    M mlir/unittests/IR/CMakeLists.txt
    A mlir/unittests/IR/SubElementInterfaceTest.cpp

  Log Message:
  -----------
  [mlir] Add new SubElementAttr/SubElementType Interfaces

These interfaces allow for a composite attribute or type to opaquely provide access to any held attributes or types. There are several intended use cases for this interface. The first of which is to allow the printer to create aliases for non-builtin dialect attributes and types. In the future, this interface will also be extended to allow for SymbolRefAttr to be placed on other entities aside from just DictionaryAttr and ArrayAttr.

To limit potential test breakages, this revision only adds the new interfaces to the builtin attributes/types that are currently hardcoded during AsmPrinter alias generation. In a followup the remaining builtin attributes/types, and non-builtin attributes/types can be extended to support it.

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


Compare: https://github.com/llvm/llvm-project/compare/670edf3ee004...c42dd5dbb015


More information about the All-commits mailing list