[all-commits] [llvm/llvm-project] d32a9a: [mlir][Transforms] Dialect conversion: Build unres...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Mon Aug 12 00:38:34 PDT 2024
Branch: refs/heads/users/matthias-springer/op_result_mat
Home: https://github.com/llvm/llvm-project
Commit: d32a9a628de14172924bb64570c9c29855613b4c
https://github.com/llvm/llvm-project/commit/d32a9a628de14172924bb64570c9c29855613b4c
Author: Matthias Springer <mspringer at nvidia.com>
Date: 2024-08-12 (Mon, 12 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
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 this 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.
Commit: 3605a74a9b1a4db2f1099f4be0ae76754ff3c875
https://github.com/llvm/llvm-project/commit/3605a74a9b1a4db2f1099f4be0ae76754ff3c875
Author: Matthias Springer <me at m-sp.org>
Date: 2024-08-12 (Mon, 12 Aug 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
Update mlir/lib/Transforms/Utils/DialectConversion.cpp
Co-authored-by: Jakub Kuderski <jakub at nod-labs.com>
Compare: https://github.com/llvm/llvm-project/compare/ad696ec5ef13...3605a74a9b1a
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