[all-commits] [llvm/llvm-project] 5dfb7b: [mlir][linalg] Simplify `createWriteOrMaskedWrite`...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Sun Jun 8 04:37:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5dfb7bbaa4fc0c6f4bb7b8fb38fecade39fb8a02
https://github.com/llvm/llvm-project/commit/5dfb7bbaa4fc0c6f4bb7b8fb38fecade39fb8a02
Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
Date: 2025-06-08 (Sun, 08 Jun 2025)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Log Message:
-----------
[mlir][linalg] Simplify `createWriteOrMaskedWrite` (NFC) (#141567)
This patch removes `inputVecSizesForLeadingDims` from the parameter list
of `createWriteOrMaskedWrite`. That argument is unnecessary - vector
sizes can be obtained from the `vecToStore` parameter. Since this doesn't
change behavior or test results, it's marked as NFC.
Additional cleanups:
* Renamed `vectorToStore` to `vecToStore` for consistency and brevity.
* Rewrote a conditional at the end of the function to use early exit,
improving readability:
```cpp
// BEFORE:
if (maskingRequried) {
Value maskForWrite = ...;
write = maskOperation(write, maskForWrite);
}
return write;
// AFTER
if (!maskingRequried)
return write;
Value maskFroWrite = ...;
return vector::maskOperation(builder, write, maskForWrite);
```
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