Apply clang-tidy fixes for llvm-else-after-return in MultiBuffer.cpp (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Thu, 6 Oct 2022 19:13:00 +0000 (19:13 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 12 Oct 2022 01:16:35 +0000 (01:16 +0000)
mlir/lib/Dialect/MemRef/Transforms/MultiBuffer.cpp

index d28a603..faa00e2 100644 (file)
@@ -128,11 +128,11 @@ FailureOr<memref::AllocOp> mlir::memref::multiBuffer(memref::AllocOp allocOp,
   auto getAffineExpr = [&](OpFoldResult e) -> AffineExpr {
     if (Optional<int64_t> constValue = getConstantIntValue(e)) {
       return getAffineConstantExpr(*constValue, allocOp.getContext());
-    } else {
-      auto value = getOrCreateValue(e, builder, candidateLoop->getLoc());
-      operands.push_back(value);
-      return getAffineDimExpr(dimCount++, allocOp.getContext());
     }
+    auto value = getOrCreateValue(e, builder, candidateLoop->getLoc());
+    operands.push_back(value);
+    return getAffineDimExpr(dimCount++, allocOp.getContext());
+   
   };
   auto init = getAffineExpr(*lowerBound);
   auto step = getAffineExpr(*singleStep);