History log of /llvm-project/mlir/test/lib/Dialect/LLVM/TestPatterns.cpp (Results 1 – 1 of 1)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# a0ef12c6 24-Nov-2024 Matthias Springer <me@m-sp.org>

[mlir][LLVM] `LLVMTypeConverter`: Tighten materialization checks (#116532)

This commit adds extra checks to the MemRef argument materializations in
the LLVM type converter. These materializations c

[mlir][LLVM] `LLVMTypeConverter`: Tighten materialization checks (#116532)

This commit adds extra checks to the MemRef argument materializations in
the LLVM type converter. These materializations construct a
`MemRefType`/`UnrankedMemRefType` from the unpacked elements of a MemRef
descriptor or from a bare pointer.

The extra checks ensure that the inputs to the materialization function
are correct. It is possible that a user added extra type conversion
rules that convert MemRef types in a different way and the extra checks
ensure that we construct a MemRef descriptor only if the inputs are what
we expect.

This commit also drops a check around bare pointer materializations:
```
// This is a bare pointer. We allow bare pointers only for function entry
// blocks.
```
This check should not be part of the materialization function. Whether a
MemRef block argument is converted into a MemRef descriptor or a bare
pointer is decided in the lowering pattern. At the point of time when
materialization functions are executed, we already made that decision
and we should just materialize regardless of the input format.

show more ...