Replace explicit concatenation by llvm::concat
authorNicolas Vasilache <ntv@google.com>
Wed, 13 Nov 2019 20:54:02 +0000 (12:54 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 13 Nov 2019 20:54:29 +0000 (12:54 -0800)
PiperOrigin-RevId: 280258938

mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp

index 76b1858..09a1ba6 100644 (file)
@@ -207,12 +207,10 @@ makeTiledViews(OpBuilder &b, Location loc, LinalgOp linalgOp,
   // Traverse the mins/maxes and erase those that don't have uses left.
   // This is a special type of folding that we only apply when `folder` is
   // defined.
-  if (folder) {
-    lbs.append(subViewSizes.begin(), subViewSizes.end());
-    for (auto *v : lbs)
+  if (folder)
+    for (auto *v : llvm::concat<Value *>(lbs, subViewSizes))
       if (v->use_empty())
         v->getDefiningOp()->erase();
-  }
 
   return res;
 }