[Mlir-commits] [mlir] 370d0ba - [mlir] Expose parseDimAndSymbolList from affineops.h
Stella Stamenova
llvmlistbot at llvm.org
Fri Nov 20 09:27:36 PST 2020
Author: Stella Stamenova
Date: 2020-11-20T09:26:58-08:00
New Revision: 370d0bac902da3c103771900d2d363f7e5121ca2
URL: https://github.com/llvm/llvm-project/commit/370d0bac902da3c103771900d2d363f7e5121ca2
DIFF: https://github.com/llvm/llvm-project/commit/370d0bac902da3c103771900d2d363f7e5121ca2.diff
LOG: [mlir] Expose parseDimAndSymbolList from affineops.h
This was removed from ops.h, but it is used by onnx-mlir
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D91830
Added:
Modified:
mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
index 96b7fd1e345b..19500c53ea60 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
+++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h
@@ -337,6 +337,11 @@ bool isValidSymbol(Value value);
/// for all its uses in `region`.
bool isValidSymbol(Value value, Region *region);
+/// Parses dimension and symbol list and returns true if parsing failed.
+ParseResult parseDimAndSymbolList(OpAsmParser &parser,
+ SmallVectorImpl<Value> &operands,
+ unsigned &numDims);
+
/// Modifies both `map` and `operands` in-place so as to:
/// 1. drop duplicate operands
/// 2. drop unused dims and symbols from map
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index d2e347544cab..299569602ea1 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -308,9 +308,9 @@ static void printDimAndSymbolList(Operation::operand_iterator begin,
}
/// Parses dimension and symbol list and returns true if parsing failed.
-static ParseResult parseDimAndSymbolList(OpAsmParser &parser,
- SmallVectorImpl<Value> &operands,
- unsigned &numDims) {
+ParseResult mlir::parseDimAndSymbolList(OpAsmParser &parser,
+ SmallVectorImpl<Value> &operands,
+ unsigned &numDims) {
SmallVector<OpAsmParser::OperandType, 8> opInfos;
if (parser.parseOperandList(opInfos, OpAsmParser::Delimiter::Paren))
return failure();
More information about the Mlir-commits
mailing list