From 78453e370547b8acd20093ab5d2fc18b7abc52a1 Mon Sep 17 00:00:00 2001 From: Chintan Kaur Date: Wed, 20 May 2020 03:10:23 +0000 Subject: [PATCH] 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 --- mlir/include/mlir/IR/AffineMap.h | 2 +- mlir/lib/IR/AffineMap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 @@ public: AffineMap replaceDimsAndSymbols(ArrayRef dimReplacements, ArrayRef 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 callback) const { AffineMap AffineMap::replaceDimsAndSymbols(ArrayRef dimReplacements, ArrayRef symReplacements, unsigned numResultDims, - unsigned numResultSyms) { + unsigned numResultSyms) const { SmallVector results; results.reserve(getNumResults()); for (auto expr : getResults())