[all-commits] [llvm/llvm-project] 6f771c: [mlir][Transforms] Dialect conversion: Build unres...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Aug 1 09:32:38 PDT 2024
Branch: refs/heads/users/matthias-springer/op_result_mat
Home: https://github.com/llvm/llvm-project
Commit: 6f771c12fdc1459da867a89bf89c32a38251a4a1
https://github.com/llvm/llvm-project/commit/6f771c12fdc1459da867a89bf89c32a38251a4a1
Author: Matthias Springer <mspringer at nvidia.com>
Date: 2024-08-01 (Thu, 01 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.
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