[Mlir-commits] [mlir] 78453e3 - Mark AffineMap::replaceDimsAndSymbols as const (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue May 19 20:12:54 PDT 2020
Author: Chintan Kaur
Date: 2020-05-20T03:11:41Z
New Revision: 78453e370547b8acd20093ab5d2fc18b7abc52a1
URL: https://github.com/llvm/llvm-project/commit/78453e370547b8acd20093ab5d2fc18b7abc52a1
DIFF: https://github.com/llvm/llvm-project/commit/78453e370547b8acd20093ab5d2fc18b7abc52a1.diff
LOG: Mark AffineMap::replaceDimsAndSymbols as const (NFC)
This is consistent to the other methods of the class, as well as
AffineExpr::replaceDimsAndSymbols.
Differential Revision: https://reviews.llvm.org/D80266
Added:
Modified:
mlir/include/mlir/IR/AffineMap.h
mlir/lib/IR/AffineMap.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/AffineMap.h b/mlir/include/mlir/IR/AffineMap.h
index 8f564a27adae..841ec6abcedf 100644
--- a/mlir/include/mlir/IR/AffineMap.h
+++ b/mlir/include/mlir/IR/AffineMap.h
@@ -137,7 +137,7 @@ class AffineMap {
AffineMap replaceDimsAndSymbols(ArrayRef<AffineExpr> dimReplacements,
ArrayRef<AffineExpr> symReplacements,
unsigned numResultDims,
- unsigned numResultSyms);
+ unsigned numResultSyms) const;
/// Folds the results of the application of an affine map on the provided
/// operands to a constant if possible.
diff --git a/mlir/lib/IR/AffineMap.cpp b/mlir/lib/IR/AffineMap.cpp
index 8f2c944f388e..07a01f0bf75f 100644
--- a/mlir/lib/IR/AffineMap.cpp
+++ b/mlir/lib/IR/AffineMap.cpp
@@ -296,7 +296,7 @@ void AffineMap::walkExprs(std::function<void(AffineExpr)> callback) const {
AffineMap AffineMap::replaceDimsAndSymbols(ArrayRef<AffineExpr> dimReplacements,
ArrayRef<AffineExpr> symReplacements,
unsigned numResultDims,
- unsigned numResultSyms) {
+ unsigned numResultSyms) const {
SmallVector<AffineExpr, 8> results;
results.reserve(getNumResults());
for (auto expr : getResults())
More information about the Mlir-commits
mailing list