[all-commits] [llvm/llvm-project] 2d5002: [mlir][Transforms] Dialect conversion: Build unres...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Aug 15 02:33:58 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2d50029f986da1fdc9cb88cd8a1070aa086dc6b6
https://github.com/llvm/llvm-project/commit/2d50029f986da1fdc9cb88cd8a1070aa086dc6b6
Author: Matthias Springer <me at m-sp.org>
Date: 2024-08-15 (Thu, 15 Aug 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
M mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
M mlir/test/Dialect/Bufferization/Transforms/finalizing-bufferize.mlir
M mlir/test/Transforms/test-legalize-type-conversion.mlir
Log Message:
-----------
[mlir][Transforms] Dialect conversion: Build unresolved materialization for replaced ops (#101514)
When inserting an argument/source/target materialization, the dialect
conversion framework first inserts a "dummy"
`unrealized_conversion_cast` op (during the rewrite process) and then
(in the "finialize" phase) replaces these cast ops with the IR generated
by the type converter callback.
This is the case for all materializations, except when ops are being
replaced with values that have a different type. In that case, the
dialect conversion currently directly emits a source materialization.
This commit changes the implementation, such that a temporary
`unrealized_conversion_cast` is also inserted in that case.
This commit simplifies the code base: all materializations now happen in
`legalizeUnresolvedMaterialization`. This commit makes it possible to
decouple source/target/argument materializations from the dialect
conversion (to reduce the complexity of the code base). Such
materializations can then also be optional. This will be implemented in
a follow-up commit.
Depends on #101476.
---------
Co-authored-by: Jakub Kuderski <jakub at nod-labs.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list