[PATCH] D77126: Add a method to build affine maps with zero or more results.
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 02:09:52 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG49af3809423b: Add a method to build affine maps with zero or more results. (authored by ulysseB, committed by ftynse).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77126/new/
https://reviews.llvm.org/D77126
Files:
mlir/include/mlir/IR/AffineMap.h
mlir/lib/IR/MLIRContext.cpp
Index: mlir/lib/IR/MLIRContext.cpp
===================================================================
--- mlir/lib/IR/MLIRContext.cpp
+++ mlir/lib/IR/MLIRContext.cpp
@@ -630,7 +630,7 @@
AffineMap AffineMap::get(unsigned dimCount, unsigned symbolCount,
MLIRContext *context) {
- return getImpl(dimCount, /*symbolCount=*/0, /*results=*/{}, context);
+ return getImpl(dimCount, symbolCount, /*results=*/{}, context);
}
AffineMap AffineMap::get(unsigned dimCount, unsigned symbolCount,
@@ -640,6 +640,11 @@
return getImpl(dimCount, symbolCount, results, results[0].getContext());
}
+AffineMap AffineMap::get(unsigned dimCount, unsigned symbolCount,
+ ArrayRef<AffineExpr> results, MLIRContext *context) {
+ return getImpl(dimCount, symbolCount, results, context);
+}
+
//===----------------------------------------------------------------------===//
// Integer Sets: these are allocated into the bump pointer, and are immutable.
// Unlike AffineMap's, these are uniqued only if they are small.
Index: mlir/include/mlir/IR/AffineMap.h
===================================================================
--- mlir/include/mlir/IR/AffineMap.h
+++ mlir/include/mlir/IR/AffineMap.h
@@ -49,9 +49,16 @@
static AffineMap get(unsigned dimCount, unsigned symbolCount,
MLIRContext *context);
+ /// Returns an affine map with `dimCount` dimensions and `symbolCount` symbols
+ /// mapping to the given results. The array of results cannot be empty.
static AffineMap get(unsigned dimCount, unsigned symbolCount,
ArrayRef<AffineExpr> results);
+ /// Returns an affine map with `dimCount` dimensions and `symbolCount` mapping
+ /// to the given results, where the number of results can be zero.
+ static AffineMap get(unsigned dimCount, unsigned symbolCount,
+ ArrayRef<AffineExpr> results, MLIRContext *context);
+
/// Returns a single constant result affine map.
static AffineMap getConstantMap(int64_t val, MLIRContext *context);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77126.254121.patch
Type: text/x-patch
Size: 2075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/bcd173c3/attachment.bin>
More information about the llvm-commits
mailing list