mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
[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:
@@ -651,7 +651,6 @@ namespace {
|
||||
struct ConvertVectorToSCFPass
|
||||
: public ConvertVectorToSCFBase<ConvertVectorToSCFPass> {
|
||||
ConvertVectorToSCFPass() = default;
|
||||
ConvertVectorToSCFPass(const ConvertVectorToSCFPass &pass) {}
|
||||
ConvertVectorToSCFPass(const VectorTransferToSCFOptions &options) {
|
||||
this->fullUnroll = options.unroll;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ mlir::linalg::LinalgTilingOptions::setTileSizes(ArrayRef<int64_t> ts) {
|
||||
}));
|
||||
};
|
||||
return *this;
|
||||
};
|
||||
}
|
||||
|
||||
/// Linalg base tiling pattern.
|
||||
mlir::linalg::LinalgBaseTilingPattern::LinalgBaseTilingPattern(
|
||||
|
||||
@@ -187,7 +187,7 @@ struct AssumingWithTrue : public OpRewritePattern<AssumingOp> {
|
||||
return success();
|
||||
}
|
||||
};
|
||||
}; // namespace
|
||||
} // namespace
|
||||
|
||||
void AssumingOp::getCanonicalizationPatterns(OwningRewritePatternList &patterns,
|
||||
MLIRContext *context) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user