[Mlir-commits] [mlir] [mlir][vector] Update the internal representation of in_bounds (PR #100336)

Benjamin Maxwell llvmlistbot at llvm.org
Tue Aug 13 09:49:12 PDT 2024


================
@@ -242,10 +242,11 @@ static void generateInBoundsCheck(
 }
 
 /// Given an ArrayAttr, return a copy where the first element is dropped.
-static ArrayAttr dropFirstElem(OpBuilder &b, ArrayAttr attr) {
+static DenseBoolArrayAttr dropFirstElem(OpBuilder &b, DenseBoolArrayAttr attr) {
   if (!attr)
     return attr;
-  return ArrayAttr::get(b.getContext(), attr.getValue().drop_front());
----------------
MacDue wrote:

If the builders just took `ArrayRef<bool>` you would not need these one-off helpers :)

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


More information about the Mlir-commits mailing list