[PATCH] D80267: [mlir][Linalg] Refactor linalg tiling
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 13:36:40 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/EDSC/Builders.cpp:81
+static void unpackRanges(ArrayRef<Value> rangeOps, SmallVectorImpl<Value> &lbs,
+ SmallVectorImpl<Value> &ubs,
----------------
Static functions should be in the top-level namespace, not in nested namespaces.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp:41
static bool isZero(Value v) {
- return isa_and_nonnull<ConstantIndexOp>(v.getDefiningOp()) &&
- cast<ConstantIndexOp>(v.getDefiningOp()).getValue() == 0;
+ if (auto cst = v.getDefiningOp<ConstantIndexOp>())
+ return cst.getValue() == 0;
----------------
m_Zero?
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp:108
+ &op->getParentOfType<FuncOp>().getBody().front());
+ return llvm::to_vector<4>(llvm::map_range(tileSizes, [&](int64_t s) {
+ Value v = b.create<ConstantIndexOp>(op->getLoc(), s);
----------------
nit:
```
[&](int64_t s) -> Value {
return b.create<...>(...);
}));
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80267/new/
https://reviews.llvm.org/D80267
More information about the llvm-commits
mailing list