[all-commits] [llvm/llvm-project] 03d136: [mlir] Promote the SubElementInterfaces to a core ...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Jan 27 15:28:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03d136cf5f3f10b618b7e17f897ebf6019518dcc
      https://github.com/llvm/llvm-project/commit/03d136cf5f3f10b618b7e17f897ebf6019518dcc
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
    A mlir/include/mlir/IR/AttrTypeSubElements.h
    M mlir/include/mlir/IR/AttributeSupport.h
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/BuiltinAttributes.h
    M mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/include/mlir/IR/BuiltinLocationAttributes.td
    M mlir/include/mlir/IR/BuiltinTypes.h
    M mlir/include/mlir/IR/BuiltinTypes.td
    M mlir/include/mlir/IR/CMakeLists.txt
    M mlir/include/mlir/IR/Location.h
    M mlir/include/mlir/IR/StorageUniquerSupport.h
    R mlir/include/mlir/IR/SubElementInterfaces.h
    R mlir/include/mlir/IR/SubElementInterfaces.td
    M mlir/include/mlir/IR/TypeRange.h
    M mlir/include/mlir/IR/TypeSupport.h
    M mlir/include/mlir/IR/Types.h
    M mlir/include/mlir/IR/Visitors.h
    M mlir/lib/Dialect/GPU/Transforms/LowerMemorySpaceAttributes.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    A mlir/lib/IR/AttrTypeSubElements.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/IR/ExtensibleDialect.cpp
    R mlir/lib/IR/SubElementInterfaces.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/lib/IR/TypeDetail.h
    M mlir/lib/IR/Types.cpp
    M mlir/test/IR/test-symbol-rauw.mlir
    M mlir/test/lib/Dialect/Test/TestAttrDefs.td
    M mlir/test/lib/Dialect/Test/TestTypes.h
    M mlir/unittests/Dialect/LLVMIR/LLVMTypeTest.cpp
    M mlir/unittests/IR/AttributeTest.cpp
    M mlir/unittests/IR/CMakeLists.txt
    M mlir/unittests/IR/InterfaceTest.cpp
    R mlir/unittests/IR/SubElementInterfaceTest.cpp

  Log Message:
  -----------
  [mlir] Promote the SubElementInterfaces to a core Attribute/Type construct

This commit restructures the sub element infrastructure to be a core part
of attributes and types, instead of being relegated to an interface. This
establishes sub element walking/replacement as something "always there",
which makes it easier to rely on for correctness/etc (which various bits of
infrastructure want, such as Symbols).

Attribute/Type now have `walk` and `replace` methods directly
accessible, which provide power API for interacting with sub elements. As
part of this, a new AttrTypeWalker class is introduced that supports caching
walked attributes/types, and a friendlier API (see the simplification of symbol
walking in SymbolTable.cpp).

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




More information about the All-commits mailing list