forked from OSchip/llvm-project
[MLIR] Fix warnings in AffineOps.cpp
Fix warnings in AffineOps.cpp. Differential Revision: https://reviews.llvm.org/D103374
This commit is contained in:
parent
4fc3286951
commit
18c2106e28
|
@ -23,7 +23,6 @@
|
|||
#include "llvm/Support/Debug.h"
|
||||
|
||||
using namespace mlir;
|
||||
using llvm::dbgs;
|
||||
|
||||
#define DEBUG_TYPE "affine-analysis"
|
||||
|
||||
|
@ -2305,17 +2304,17 @@ static ParseResult parseAffineMinMaxOp(OpAsmParser &parser,
|
|||
OperationState &result) {
|
||||
auto &builder = parser.getBuilder();
|
||||
auto indexType = builder.getIndexType();
|
||||
SmallVector<OpAsmParser::OperandType, 8> dim_infos;
|
||||
SmallVector<OpAsmParser::OperandType, 8> sym_infos;
|
||||
SmallVector<OpAsmParser::OperandType, 8> dimInfos;
|
||||
SmallVector<OpAsmParser::OperandType, 8> symInfos;
|
||||
AffineMapAttr mapAttr;
|
||||
return failure(
|
||||
parser.parseAttribute(mapAttr, T::getMapAttrName(), result.attributes) ||
|
||||
parser.parseOperandList(dim_infos, OpAsmParser::Delimiter::Paren) ||
|
||||
parser.parseOperandList(sym_infos,
|
||||
parser.parseOperandList(dimInfos, OpAsmParser::Delimiter::Paren) ||
|
||||
parser.parseOperandList(symInfos,
|
||||
OpAsmParser::Delimiter::OptionalSquare) ||
|
||||
parser.parseOptionalAttrDict(result.attributes) ||
|
||||
parser.resolveOperands(dim_infos, indexType, result.operands) ||
|
||||
parser.resolveOperands(sym_infos, indexType, result.operands) ||
|
||||
parser.resolveOperands(dimInfos, indexType, result.operands) ||
|
||||
parser.resolveOperands(symInfos, indexType, result.operands) ||
|
||||
parser.addTypeToList(indexType, result.types));
|
||||
}
|
||||
|
||||
|
@ -2655,14 +2654,12 @@ void AffineParallelOp::build(OpBuilder &builder, OperationState &result,
|
|||
}) &&
|
||||
"expected all upper bounds maps to have the same number of dimensions "
|
||||
"and symbols");
|
||||
assert(lbMaps.empty() ||
|
||||
lbMaps[0].getNumInputs() == lbArgs.size() &&
|
||||
"expected lower bound maps to have as many inputs as lower bound "
|
||||
"operands");
|
||||
assert(ubMaps.empty() ||
|
||||
ubMaps[0].getNumInputs() == ubArgs.size() &&
|
||||
"expected upper bound maps to have as many inputs as upper bound "
|
||||
"operands");
|
||||
assert((lbMaps.empty() || lbMaps[0].getNumInputs() == lbArgs.size()) &&
|
||||
"expected lower bound maps to have as many inputs as lower bound "
|
||||
"operands");
|
||||
assert((ubMaps.empty() || ubMaps[0].getNumInputs() == ubArgs.size()) &&
|
||||
"expected upper bound maps to have as many inputs as upper bound "
|
||||
"operands");
|
||||
|
||||
result.addTypes(resultTypes);
|
||||
|
||||
|
|
Loading…
Reference in New Issue