[PATCH] D76338: [mlir][Linalg] Remove initial value for conditions.
Han-Chung Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 13:35:23 PDT 2020
hanchung marked 3 inline comments as done.
hanchung added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:191
SmallVector<ValueHandle, 8> conds = {
- std_constant_int(/*value=*/1, /*width=*/1)};
+ std_constant(BoolAttr::get(true, context))};
SmallVector<ValueHandle, 8> clampedImIdx;
----------------
nicolasvasilache wrote:
> mravishankar wrote:
> > Maybe avoid having a "initial value" altogether? Just check if conds.size() == 0 to check if a condition already exists in the stack.
> +1, then the idiomatic MLIR way is to use `conds.empty()`
Good point, and we can just rely on the return type of logical operations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76338/new/
https://reviews.llvm.org/D76338
More information about the llvm-commits
mailing list