[Mlir-commits] [mlir] 9f310be - Add missing override (& fix an else-after-return while I'm here)
David Blaikie
llvmlistbot at llvm.org
Wed Nov 11 12:29:33 PST 2020
Author: David Blaikie
Date: 2020-11-11T12:29:08-08:00
New Revision: 9f310bec34a2d4175ab0d33ca4f380f4f0c00557
URL: https://github.com/llvm/llvm-project/commit/9f310bec34a2d4175ab0d33ca4f380f4f0c00557
DIFF: https://github.com/llvm/llvm-project/commit/9f310bec34a2d4175ab0d33ca4f380f4f0c00557.diff
LOG: Add missing override (& fix an else-after-return while I'm here)
Added:
Modified:
mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
index a12b4bd20be19..1b12384ac2c71 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaMakeBroadcastable.cpp
@@ -117,9 +117,10 @@ static int reshapeLowerToHigher(PatternRewriter &rewriter, Location loc,
Value higherTensorValue, lowerTensorValue;
// return if rank already match
- if (input1Rank == input2Rank) {
+ if (input1Rank == input2Rank)
return 1;
- } else if (input1Rank > input2Rank) {
+
+ if (input1Rank > input2Rank) {
higherTensorValue = input1;
lowerTensorValue = input2;
} else {
@@ -166,7 +167,7 @@ struct ConvertTosaOp : public OpRewritePattern<OpTy> {
using OpRewritePattern<OpTy>::OpRewritePattern;
LogicalResult matchAndRewrite(OpTy tosaBinaryOp,
- PatternRewriter &rewriter) const {
+ PatternRewriter &rewriter) const override {
Value input1 = tosaBinaryOp.input1();
Value input2 = tosaBinaryOp.input2();
@@ -192,7 +193,7 @@ struct ConvertTosaOp<tosa::MulOp> : public OpRewritePattern<tosa::MulOp> {
using OpRewritePattern<tosa::MulOp>::OpRewritePattern;
LogicalResult matchAndRewrite(tosa::MulOp tosaBinaryOp,
- PatternRewriter &rewriter) const {
+ PatternRewriter &rewriter) const override {
Value input1 = tosaBinaryOp.input1();
Value input2 = tosaBinaryOp.input2();
@@ -221,7 +222,7 @@ struct ConvertTosaOp<tosa::ArithmeticRightShiftOp>
using OpRewritePattern<tosa::ArithmeticRightShiftOp>::OpRewritePattern;
LogicalResult matchAndRewrite(tosa::ArithmeticRightShiftOp tosaBinaryOp,
- PatternRewriter &rewriter) const {
+ PatternRewriter &rewriter) const override {
Value input1 = tosaBinaryOp.input1();
Value input2 = tosaBinaryOp.input2();
More information about the Mlir-commits
mailing list