[mlir] Fix some of the warnings in MLIR code.

Summary:
* extra ';' in the following files:
    mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    mlir/lib/Dialect/Shape/IR/Shape.cpp

* base class ‘mlir::ConvertVectorToSCFBase<ConvertVectorToSCFPass>’
  should be explicitly initialized in the copy constructor [-Wextra] in
    mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp

* warning: ‘bool Expression::operator==(const Expression&) const’
  defined but not used [-Wunused-function] in
    mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp

Differential Revision: https://reviews.llvm.org/D81673
This commit is contained in:
Alexander Belyaev 2020-06-11 19:22:48 +02:00
parent 8fa3e8fa14
commit e9ac792748
4 changed files with 3 additions and 19 deletions

View file

@ -651,7 +651,6 @@ namespace {
struct ConvertVectorToSCFPass
: public ConvertVectorToSCFBase<ConvertVectorToSCFPass> {
ConvertVectorToSCFPass() = default;
ConvertVectorToSCFPass(const ConvertVectorToSCFPass &pass) {}
ConvertVectorToSCFPass(const VectorTransferToSCFOptions &options) {
this->fullUnroll = options.unroll;
}

View file

@ -101,7 +101,7 @@ mlir::linalg::LinalgTilingOptions::setTileSizes(ArrayRef<int64_t> ts) {
}));
};
return *this;
};
}
/// Linalg base tiling pattern.
mlir::linalg::LinalgBaseTilingPattern::LinalgBaseTilingPattern(

View file

@ -187,7 +187,7 @@ struct AssumingWithTrue : public OpRewritePattern<AssumingOp> {
return success();
}
};
}; // namespace
} // namespace
void AssumingOp::getCanonicalizationPatterns(OwningRewritePatternList &patterns,
MLIRContext *context) {

View file

@ -846,9 +846,8 @@ struct Expression {
};
explicit Expression(Kind k = Kind::Uninitialized) : kind(k) {}
virtual ~Expression() = 0;
virtual ~Expression() = default;
bool operator==(const Expression &e) const;
operator bool() const { return kind != Kind::Uninitialized; }
Kind kind;
@ -930,20 +929,6 @@ struct TensorExpr : public Expression {
SetVector<unsigned> reductionDimensions;
};
Expression::~Expression() {}
bool Expression::operator==(const Expression &e) const {
if (this->kind != e.kind)
return false;
if (e.kind == Expression::Kind::TensorUse)
return static_cast<const TensorUse &>(*this) ==
static_cast<const TensorUse &>(e);
if (e.kind == Expression::Kind::TensorExpr)
return static_cast<const TensorExpr &>(*this) ==
static_cast<const TensorExpr &>(e);
llvm_unreachable("Unexpected case");
}
/// This is a specialized parser for a TCDef.
/// This maintains the dims it finds in an eager fashion.
class TCParser {