[PATCH] D76338: [mlir][Linalg] Use boolAttr in conditions instead of 1-bit integer.

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 09:47:29 PDT 2020


nicolasvasilache 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;
----------------
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()`


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