[all-commits] [llvm/llvm-project] 9bd5be: [mlir][Transforms] Dialect conversion: Build unres...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Aug 15 01:55:05 PDT 2024
Branch: refs/heads/users/matthias-springer/op_result_mat
Home: https://github.com/llvm/llvm-project
Commit: 9bd5beec743f2e60891147bff9d3db2d97d822d6
https://github.com/llvm/llvm-project/commit/9bd5beec743f2e60891147bff9d3db2d97d822d6
Author: Matthias Springer <mspringer at nvidia.com>
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
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: 7d9ce368fdb4b0fd830b820bf07fd9305e1500a5
https://github.com/llvm/llvm-project/commit/7d9ce368fdb4b0fd830b820bf07fd9305e1500a5
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
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/3605a74a9b1a...7d9ce368fdb4
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