OSDN Git Service

Mark AffineMap::replaceDimsAndSymbols as const (NFC)
authorChintan Kaur <kaurc@google.com>
Wed, 20 May 2020 03:10:23 +0000 (03:10 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 20 May 2020 03:11:41 +0000 (03:11 +0000)
This is consistent to the other methods of the class, as well as
AffineExpr::replaceDimsAndSymbols.

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

mlir/include/mlir/IR/AffineMap.h
mlir/lib/IR/AffineMap.cpp

index 8f564a2..841ec6a 100644 (file)
@@ -137,7 +137,7 @@ public:
   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.
index 8f2c944..07a01f0 100644 (file)
@@ -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())