[Mlir-commits] [mlir] af2d2d7 - [mlir] Remove redundaunt return statements (NFC)

Kazu Hirata llvmlistbot at llvm.org
Sun Aug 7 00:16:38 PDT 2022


Author: Kazu Hirata
Date: 2022-08-07T00:16:13-07:00
New Revision: af2d2d775908734f2a71a70a24ad540760f2d88b

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

LOG: [mlir] Remove redundaunt return statements (NFC)

Identified with readability-redundant-control-flow.

Added: 
    

Modified: 
    mlir/lib/Transforms/Utils/CommutativityUtils.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/Utils/CommutativityUtils.cpp b/mlir/lib/Transforms/Utils/CommutativityUtils.cpp
index 57cc3a2958256..6034366631d10 100644
--- a/mlir/lib/Transforms/Utils/CommutativityUtils.cpp
+++ b/mlir/lib/Transforms/Utils/CommutativityUtils.cpp
@@ -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;
   }
 };
 


        


More information about the Mlir-commits mailing list