[all-commits] [llvm/llvm-project] 2d9d12: [mlir][Transforms] Dialect conversion: Build unres...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Sat Aug 3 00:03:36 PDT 2024
Branch: refs/heads/users/matthias-springer/op_result_mat
Home: https://github.com/llvm/llvm-project
Commit: 2d9d1281db99061b212259a60a8bffdfdc800447
https://github.com/llvm/llvm-project/commit/2d9d1281db99061b212259a60a8bffdfdc800447
Author: Matthias Springer <mspringer at nvidia.com>
Date: 2024-08-03 (Sat, 03 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