[Mlir-commits] [mlir] c5ea8d5 - Apply clang-tidy fixes for llvm-else-after-return in Merger.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri May 6 12:38:39 PDT 2022


Author: Mehdi Amini
Date: 2022-05-06T19:38:03Z
New Revision: c5ea8d509cf87d6731f658acb1937d845a005f37

URL: https://github.com/llvm/llvm-project/commit/c5ea8d509cf87d6731f658acb1937d845a005f37
DIFF: https://github.com/llvm/llvm-project/commit/c5ea8d509cf87d6731f658acb1937d845a005f37.diff

LOG: Apply clang-tidy fixes for llvm-else-after-return in Merger.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp b/mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
index e670d4e806163..6b8df92764d3e 100644
--- a/mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
@@ -572,15 +572,13 @@ unsigned Merger::buildLattices(unsigned e, unsigned i) {
       if (absentRegion.empty()) {
         // Simple mapping over existing values.
         return mapSet(kind, child0, Value(), unop);
-      } else {
-        // Use a disjunction with `unop` on the left and the absent value as an
-        // invariant on the right.
-        Block &absentBlock = absentRegion.front();
-        YieldOp absentYield = cast<YieldOp>(absentBlock.getTerminator());
-        Value absentVal = absentYield.result();
-        unsigned rhs = addExp(kInvariant, absentVal);
-        return takeDisj(kind, child0, buildLattices(rhs, i), unop);
-      }
+      } // Use a disjunction with `unop` on the left and the absent value as an
+      // invariant on the right.
+      Block &absentBlock = absentRegion.front();
+      YieldOp absentYield = cast<YieldOp>(absentBlock.getTerminator());
+      Value absentVal = absentYield.result();
+      unsigned rhs = addExp(kInvariant, absentVal);
+      return takeDisj(kind, child0, buildLattices(rhs, i), unop);
     }
   case kMulF:
   case kMulI:


        


More information about the Mlir-commits mailing list