[all-commits] [llvm/llvm-project] 38c219: [mlir] Infer SubElementInterface implementations u...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Nov 4 18:26:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38c219b4a8ebe30d781a1ebbb9a9d29b24c28b39
      https://github.com/llvm/llvm-project/commit/38c219b4a8ebe30d781a1ebbb9a9d29b24c28b39
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    M flang/test/Fir/affine-promotion.fir
    M mlir/docs/AttributesAndTypes.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/include/mlir/IR/BuiltinAttributes.td
    M mlir/include/mlir/IR/BuiltinLocationAttributes.td
    M mlir/include/mlir/IR/Location.h
    M mlir/include/mlir/IR/StorageUniquerSupport.h
    M mlir/include/mlir/IR/SubElementInterfaces.h
    M mlir/include/mlir/IR/SubElementInterfaces.td
    M mlir/include/mlir/IR/TypeRange.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/lib/IR/BuiltinTypes.cpp
    M mlir/lib/IR/Location.cpp
    M mlir/lib/IR/SubElementInterfaces.cpp
    M mlir/lib/IR/TypeDetail.h
    M mlir/test/Dialect/Affine/loop-tiling.mlir
    M mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
    M mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
    M mlir/test/Dialect/SCF/for-loop-specialization.mlir
    M mlir/test/Dialect/SCF/parallel-loop-specialization.mlir
    M mlir/test/Dialect/SCF/parallel-loop-tiling.mlir
    M mlir/test/Dialect/SparseTensor/roundtrip.mlir
    M mlir/test/IR/affine-map.mlir
    M mlir/test/IR/memory-ops.mlir
    M mlir/test/Transforms/loop-fusion-2.mlir
    M mlir/test/Transforms/normalize-memrefs-ops.mlir
    M mlir/test/lib/Dialect/Test/TestAttrDefs.td
    M mlir/test/lib/Dialect/Test/TestAttributes.cpp
    M mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
    M mlir/unittests/IR/SubElementInterfaceTest.cpp

  Log Message:
  -----------
  [mlir] Infer SubElementInterface implementations using the storage KeyTy

The KeyTy of attribute/type storage classes provide enough information for
automatically implementing the necessary sub element interface methods. This
removes the need for derived classes to do it themselves, which is both much
nicer and easier to handle certain invariants (e.g. null handling). In cases where
explicitly handling for parameter types is necessary, they can provide an implementation
of `AttrTypeSubElementHandler` to opt-in to support.

This tickles a few things alias wise, which annoyingly messes with tests that hard
code specific affine map numbers.

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


  Commit: e83446f43b23cf4a4274cb3bde09883dcd9f7b4d
      https://github.com/llvm/llvm-project/commit/e83446f43b23cf4a4274cb3bde09883dcd9f7b4d
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
    M mlir/lib/Target/LLVMIR/DebugTranslation.cpp
    M mlir/test/Target/LLVMIR/llvmir-debug.mlir

  Log Message:
  -----------
  [mlir:LLVM] Fix translation of DISubRangeAttr to LLVM

We were missing DISubRangeAttr in the type switch. This
also updates a few of the range parameters to be optional.


Compare: https://github.com/llvm/llvm-project/compare/200266a0a12b...e83446f43b23


More information about the All-commits mailing list