[Mlir-commits] [mlir] [nfc][mlir][linalg] Make example easier to read. (PR #127213)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 14 06:58:02 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-linalg

Author: Javed Absar (javedabsar1)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/127213.diff


1 Files Affected:

- (modified) mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp (+6-2) 


``````````diff
diff --git a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
index 425ef2f3068b2..d35aad514e884 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
@@ -12,8 +12,12 @@
 using namespace mlir;
 using namespace mlir::linalg;
 
-/// Swaps tensor.extract_slice(linalg.fill(%cst, %init)) into linalg.fill(%cst,
-/// tensor.extract_slice(%init)) when the linalg.fill op have no other users.
+/// swaps:
+///      `tensor.extract_slice(linalg.fill(%cst, %init))`
+/// with:
+///      `linalg.fill(%cst, tensor.extract_slice(%init))`
+///
+/// when the linalg.fill op have no other users.
 /// This helps to reduce the fill footprint.
 struct SwapExtractSliceOfFill final
     : public OpRewritePattern<tensor::ExtractSliceOp> {

``````````

</details>


https://github.com/llvm/llvm-project/pull/127213


More information about the Mlir-commits mailing list