[Mlir-commits] [mlir] 18c2106 - [MLIR] Fix warnings in AffineOps.cpp

Uday Bondhugula llvmlistbot at llvm.org
Mon May 31 05:30:42 PDT 2021


Author: Uday Bondhugula
Date: 2021-05-31T17:58:02+05:30
New Revision: 18c2106e281b111047724f139f1ab6ff6769cf6c

URL: https://github.com/llvm/llvm-project/commit/18c2106e281b111047724f139f1ab6ff6769cf6c
DIFF: https://github.com/llvm/llvm-project/commit/18c2106e281b111047724f139f1ab6ff6769cf6c.diff

LOG: [MLIR] Fix warnings in AffineOps.cpp

Fix warnings in AffineOps.cpp.

Differential Revision: https://reviews.llvm.org/D103374

Added: 
    

Modified: 
    mlir/lib/Dialect/Affine/IR/AffineOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 7e39fc364913b..ef990b70f3575 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -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);
 


        


More information about the Mlir-commits mailing list