Skip to content

Commit 9c62446

Browse files
[mlir] Remove redundant control flow statements (NFC) (#141184)
1 parent 6979ab2 commit 9c62446

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

mlir/include/mlir/Analysis/DataFlow/DenseAnalysis.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class AbstractDenseForwardDataFlowAnalysis : public DataFlowAnalysis {
125125
/// Visit an operation. If this analysis can confirm that lattice content
126126
/// of lattice anchors around operation are necessarily identical, join
127127
/// them into the same equivalent class.
128-
virtual void buildOperationEquivalentLatticeAnchor(Operation *op) { return; }
128+
virtual void buildOperationEquivalentLatticeAnchor(Operation *op) {}
129129

130130
/// Propagate the dense lattice forward along the control flow edge from
131131
/// `regionFrom` to `regionTo` regions of the `branch` operation. `nullopt`
@@ -386,7 +386,7 @@ class AbstractDenseBackwardDataFlowAnalysis : public DataFlowAnalysis {
386386
/// Visit an operation. If this analysis can confirm that lattice content
387387
/// of lattice anchors around operation are necessarily identical, join
388388
/// them into the same equivalent class.
389-
virtual void buildOperationEquivalentLatticeAnchor(Operation *op) { return; }
389+
virtual void buildOperationEquivalentLatticeAnchor(Operation *op) {}
390390

391391
/// Propagate the dense lattice backwards along the control flow edge from
392392
/// `regionFrom` to `regionTo` regions of the `branch` operation. `nullopt`

mlir/include/mlir/Analysis/DataFlowFramework.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ class DataFlowAnalysis {
622622
/// This function will union lattice anchor to same equivalent class if the
623623
/// analysis can determine the lattice content of lattice anchor is
624624
/// necessarily identical under the corrensponding lattice type.
625-
virtual void initializeEquivalentLatticeAnchor(Operation *top) { return; }
625+
virtual void initializeEquivalentLatticeAnchor(Operation *top) {}
626626

627627
protected:
628628
/// Create a dependency between the given analysis state and lattice anchor

mlir/lib/Dialect/Mesh/IR/MeshOps.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ void mlir::mesh::maybeInsertTargetShardingAnnotation(MeshSharding sharding,
314314
newShardOp.getSharding(),
315315
/*annotate_for_users*/ true);
316316
rewriter.replaceAllUsesExcept(newShardOp, newShardOp2, newShardOp2);
317-
return;
318317
}
319318

320319
void mlir::mesh::maybeInsertTargetShardingAnnotation(MeshSharding sharding,

mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
463463

464464
depth++;
465465
getMaxNestedDepth(op, depth);
466-
return;
467466
}
468467

469468
bool levelCheckMaxNesting(Operation *op) {

mlir/test/lib/Dialect/Linalg/TestLinalgRankReduceContractionOps.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ struct TestLinalgRankReduceContractionOps
5151
linalg::populateContractionOpRankReducingPatterns(patterns);
5252
if (failed(applyPatternsGreedily(funcOp.getBody(), std::move(patterns))))
5353
return signalPassFailure();
54-
return;
5554
}
5655
};
5756

0 commit comments

Comments
 (0)