Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented May 23, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-tosa

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/141184.diff

5 Files Affected:

  • (modified) mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h (+2-2)
  • (modified) mlir/include/mlir/Analysis/DataFlowFramework.h (+1-1)
  • (modified) mlir/lib/Dialect/Mesh/IR/MeshOps.cpp (-1)
  • (modified) mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp (-1)
  • (modified) mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp (-1)
diff --git a/mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h b/mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
index 7ecde7f39415c..8bcfe51ad7cd1 100644
--- a/mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
+++ b/mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h
@@ -125,7 +125,7 @@ class AbstractDenseForwardDataFlowAnalysis : public DataFlowAnalysis {
   /// Visit an operation. If this analysis can confirm that lattice content
   /// of lattice anchors around operation are necessarily identical, join
   /// them into the same equivalent class.
-  virtual void buildOperationEquivalentLatticeAnchor(Operation *op) { return; }
+  virtual void buildOperationEquivalentLatticeAnchor(Operation *op) {}
 
   /// Propagate the dense lattice forward along the control flow edge from
   /// `regionFrom` to `regionTo` regions of the `branch` operation. `nullopt`
@@ -386,7 +386,7 @@ class AbstractDenseBackwardDataFlowAnalysis : public DataFlowAnalysis {
   /// Visit an operation. If this analysis can confirm that lattice content
   /// of lattice anchors around operation are necessarily identical, join
   /// them into the same equivalent class.
-  virtual void buildOperationEquivalentLatticeAnchor(Operation *op) { return; }
+  virtual void buildOperationEquivalentLatticeAnchor(Operation *op) {}
 
   /// Propagate the dense lattice backwards along the control flow edge from
   /// `regionFrom` to `regionTo` regions of the `branch` operation. `nullopt`
diff --git a/mlir/include/mlir/Analysis/DataFlowFramework.h b/mlir/include/mlir/Analysis/DataFlowFramework.h
index caf978a51fd8e..49862927caff2 100644
--- a/mlir/include/mlir/Analysis/DataFlowFramework.h
+++ b/mlir/include/mlir/Analysis/DataFlowFramework.h
@@ -622,7 +622,7 @@ class DataFlowAnalysis {
   /// This function will union lattice anchor to same equivalent class if the
   /// analysis can determine the lattice content of lattice anchor is
   /// necessarily identical under the corrensponding lattice type.
-  virtual void initializeEquivalentLatticeAnchor(Operation *top) { return; }
+  virtual void initializeEquivalentLatticeAnchor(Operation *top) {}
 
 protected:
   /// Create a dependency between the given analysis state and lattice anchor
diff --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
index 2bdb58892937f..304cb55a35086 100644
--- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
+++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
@@ -314,7 +314,6 @@ void mlir::mesh::maybeInsertTargetShardingAnnotation(MeshSharding sharding,
                                              newShardOp.getSharding(),
                                              /*annotate_for_users*/ true);
   rewriter.replaceAllUsesExcept(newShardOp, newShardOp2, newShardOp2);
-  return;
 }
 
 void mlir::mesh::maybeInsertTargetShardingAnnotation(MeshSharding sharding,
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
index 9227b0f8fd5b9..f9db5dcb88b4c 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
@@ -463,7 +463,6 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
 
     depth++;
     getMaxNestedDepth(op, depth);
-    return;
   }
 
   bool levelCheckMaxNesting(Operation *op) {
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp
index 750ba6b5d9872..d7b7c6fe90c90 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp
@@ -51,7 +51,6 @@ struct TestLinalgRankReduceContractionOps
     linalg::populateContractionOpRankReducingPatterns(patterns);
     if (failed(applyPatternsGreedily(funcOp.getBody(), std::move(patterns))))
       return signalPassFailure();
-    return;
   }
 };
 

@kazutakahirata kazutakahirata merged commit 9c62446 into llvm:main May 23, 2025
15 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250522_drop_return_mlir branch May 23, 2025 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants