[all-commits] [llvm/llvm-project] 3c70a8: [mlir] fix integer type mismatch in alloc conversi...
ftynse via All-commits
all-commits at lists.llvm.org
Tue Jun 8 02:11:55 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3c70a82e2891949801bd5da68159cd8156659f6f
https://github.com/llvm/llvm-project/commit/3c70a82e2891949801bd5da68159cd8156659f6f
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-06-08 (Tue, 08 Jun 2021)
Changed paths:
M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
M mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
Log Message:
-----------
[mlir] fix integer type mismatch in alloc conversion to LLVM
Some places in the alloc-like op conversion use the converted index type
whereas other places use the pointer-sized integer type, which may not be the
same. Consistently use the converted index type, similarly to other address
calculations.
Reviewed By: pifon2a
Differential Revision: https://reviews.llvm.org/D103826
Commit: ada9aa5a228200cb71269c371308e82c42fd4abc
https://github.com/llvm/llvm-project/commit/ada9aa5a228200cb71269c371308e82c42fd4abc
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-06-08 (Tue, 08 Jun 2021)
Changed paths:
M mlir/docs/Dialects/Builtin.md
M mlir/include/mlir/IR/BuiltinTypes.h
M mlir/include/mlir/IR/BuiltinTypes.td
M mlir/include/mlir/IR/CMakeLists.txt
M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
M mlir/lib/IR/BuiltinTypes.cpp
M mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
M mlir/test/Conversion/StandardToLLVM/invalid.mlir
M mlir/test/IR/parser.mlir
M mlir/test/lib/Dialect/Test/CMakeLists.txt
M mlir/test/lib/Dialect/Test/TestTypeDefs.td
Log Message:
-----------
[mlir] Make MemRef element type extensible
Historically, MemRef only supported a restricted list of element types that
were known to be storable in memory. This is unnecessarily restrictive given
the open nature of MLIR's type system. Allow types to opt into being used as
MemRef elements by implementing a type interface. For now, the interface is
merely a declaration with no methods. Later, methods to query, e.g., the type
size or whether a type can alias elements of another type may be added.
Harden the "standard"-to-LLVM conversion against memrefs with non-builtin
types.
See https://llvm.discourse.group/t/rfc-memref-of-custom-types/3558.
Depends On D103826
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D103827
Commit: c59ce1f6257c88330c1f1757c36d59d34fe29248
https://github.com/llvm/llvm-project/commit/c59ce1f6257c88330c1f1757c36d59d34fe29248
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-06-08 (Tue, 08 Jun 2021)
Changed paths:
A mlir/include/mlir/Analysis/DataLayoutAnalysis.h
M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
M mlir/include/mlir/IR/BuiltinTypes.h
M mlir/include/mlir/IR/BuiltinTypes.td
M mlir/lib/Analysis/CMakeLists.txt
A mlir/lib/Analysis/DataLayoutAnalysis.cpp
M mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
M mlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir
M mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
M mlir/test/IR/parser.mlir
M mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp
Log Message:
-----------
[mlir] support memref of memref in standard-to-llvm conversion
Now that memref supports arbitrary element types, add support for memref of
memref and make sure it is properly converted to the LLVM dialect. The type
support itself avoids adding the interface to the memref type itself similarly
to other built-in types. This allows the shape, and therefore byte size, of the
memref descriptor to remain a lowering aspect that is easier to customize and
evolve as opposed to sanctifying it in the data layout specification for the
memref type itself.
Factor out the code previously in a testing pass to live in a dedicated data
layout analysis and use that analysis in the conversion to compute the
allocation size for memref of memref. Other conversions will be ported
separately.
Depends On D103827
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D103828
Compare: https://github.com/llvm/llvm-project/compare/57546f5b2224...c59ce1f6257c
More information about the All-commits
mailing list