[mlir] Remove redundaunt return statements (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 7 Aug 2022 07:16:13 +0000 (00:16 -0700)
committerKazu Hirata <kazu@google.com>
Sun, 7 Aug 2022 07:16:13 +0000 (00:16 -0700)
Identified with readability-redundant-control-flow.

mlir/lib/Transforms/Utils/CommutativityUtils.cpp

index 57cc3a2..6034366 100644 (file)
@@ -119,7 +119,6 @@ struct CommutativeOperand {
     ancestorQueue.push(op);
     if (op)
       visitedAncestors.insert(op);
-    return;
   }
 
   /// Refresh the key.
@@ -136,7 +135,6 @@ struct CommutativeOperand {
     Operation *frontAncestor = ancestorQueue.front();
     AncestorKey frontAncestorKey(frontAncestor);
     key.push_back(frontAncestorKey);
-    return;
   }
 
   /// Pop the front ancestor, if any, from the queue and then push its adjacent
@@ -154,7 +152,6 @@ struct CommutativeOperand {
       if (!operandDefOp || !visitedAncestors.contains(operandDefOp))
         pushAncestor(operandDefOp);
     }
-    return;
   }
 };