diff options
| author | Andrzej Warzyński <andrzej.warzynski@arm.com> | 2025-04-07 13:56:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 13:56:54 +0100 |
| commit | 2f6bc47a18d9a97635b76520f0e33391aa72ba68 (patch) | |
| tree | 573d49d3c80f716e963e78611f16b6f2d28b682f /mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp | |
| parent | bafa2f4442bcee26f05c22369d41646d5c8befb9 (diff) | |
[mlir][vector] Standardise `valueToStore` Naming Across Vector Ops (NFC) (#134206)
This change standardises the naming convention for the argument
representing the value to store in various vector operations.
Specifically, it ensures that all vector ops storing a value—whether
into memory, a tensor, or another vector — use `valueToStore` for the
corresponding argument name.
Updated operations:
* `vector.transfer_write`, `vector.insert`, `vector.scalable_insert`,
`vector.insert_strided_slice`.
For reference, here are operations that currently use `valueToStore`:
* `vector.store` `vector.scatter`, `vector.compressstore`,
`vector.maskedstore`.
This change is non-functional (NFC) and does not affect the
functionality of these operations.
Implements #131602
Diffstat (limited to 'mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp')
| -rw-r--r-- | mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp index 82a985c9e582..d834a9907683 100644 --- a/mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp +++ b/mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp @@ -61,7 +61,7 @@ public: // A different pattern will kick in for InsertStridedSlice with matching // ranks. auto stridedSliceInnerOp = rewriter.create<InsertStridedSliceOp>( - loc, op.getSource(), extracted, + loc, op.getValueToStore(), extracted, getI64SubArray(op.getOffsets(), /*dropFront=*/rankDiff), getI64SubArray(op.getStrides(), /*dropFront=*/0)); @@ -111,7 +111,7 @@ public: return failure(); if (srcType == dstType) { - rewriter.replaceOp(op, op.getSource()); + rewriter.replaceOp(op, op.getValueToStore()); return success(); } @@ -131,8 +131,8 @@ public: SmallVector<int64_t> offsets(nDest, 0); for (int64_t i = 0; i < nSrc; ++i) offsets[i] = i; - Value scaledSource = rewriter.create<ShuffleOp>(loc, op.getSource(), - op.getSource(), offsets); + Value scaledSource = rewriter.create<ShuffleOp>( + loc, op.getValueToStore(), op.getValueToStore(), offsets); // 2. Create a mask where we take the value from scaledSource of dest // depending on the offset. @@ -156,7 +156,7 @@ public: off += stride, ++idx) { // 1. extract the proper subvector (or element) from source Value extractedSource = - rewriter.create<ExtractOp>(loc, op.getSource(), idx); + rewriter.create<ExtractOp>(loc, op.getValueToStore(), idx); if (isa<VectorType>(extractedSource.getType())) { // 2. If we have a vector, extract the proper subvector from destination // Otherwise we are at the element level and no need to recurse. |
