summaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorUday Bondhugula <uday@polymagelabs.com>2023-05-14 17:31:51 +0530
committerUday Bondhugula <uday@polymagelabs.com>2023-05-14 17:33:00 +0530
commitb537963f5c393954063e57e75a0cacc2b9b39254 (patch)
tree3d6bce98f70be59e0f5866c9120765da99e3752c /mlir
parentbe4ced691f547a6f891f783a437fe94308bd5070 (diff)
downloadllvm-b537963f5c393954063e57e75a0cacc2b9b39254.tar.gz
[MLIR] NFC. Add missing const on affine analysis utils methods
NFC. Add missing const on affine analysis utils ComputationSliceState methods. Differential Revision: https://reviews.llvm.org/D150523
Diffstat (limited to 'mlir')
-rw-r--r--mlir/include/mlir/Dialect/Affine/Analysis/Utils.h4
-rw-r--r--mlir/lib/Dialect/Affine/Analysis/Utils.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/mlir/include/mlir/Dialect/Affine/Analysis/Utils.h b/mlir/include/mlir/Dialect/Affine/Analysis/Utils.h
index 518fd5cfcbba..7376d9b992a0 100644
--- a/mlir/include/mlir/Dialect/Affine/Analysis/Utils.h
+++ b/mlir/include/mlir/Dialect/Affine/Analysis/Utils.h
@@ -277,13 +277,13 @@ struct ComputationSliceState {
// Constraints are added for all loop IV bounds (dim or symbol), and
// constraints are added for slice bounds in 'lbs'/'ubs'.
// Returns failure if we cannot add loop bounds because of unsupported cases.
- LogicalResult getAsConstraints(FlatAffineValueConstraints *cst);
+ LogicalResult getAsConstraints(FlatAffineValueConstraints *cst) const;
/// Adds to 'cst' constraints which represent the original loop bounds on
/// 'ivs' in 'this'. This corresponds to the original domain of the loop nest
/// from which the slice is being computed. Returns failure if we cannot add
/// loop bounds because of unsupported cases.
- LogicalResult getSourceAsConstraints(FlatAffineValueConstraints &cst);
+ LogicalResult getSourceAsConstraints(FlatAffineValueConstraints &cst) const;
// Clears all bounds and operands in slice state.
void clearBounds();
diff --git a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
index f0caa2eb36d2..3687b66a6f15 100644
--- a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
@@ -533,8 +533,8 @@ void mlir::affine::getEnclosingAffineOps(Operation &op,
// Populates 'cst' with FlatAffineValueConstraints which represent original
// domain of the loop bounds that define 'ivs'.
-LogicalResult
-ComputationSliceState::getSourceAsConstraints(FlatAffineValueConstraints &cst) {
+LogicalResult ComputationSliceState::getSourceAsConstraints(
+ FlatAffineValueConstraints &cst) const {
assert(!ivs.empty() && "Cannot have a slice without its IVs");
cst = FlatAffineValueConstraints(/*numDims=*/ivs.size(), /*numSymbols=*/0,
/*numLocals=*/0, ivs);
@@ -549,7 +549,7 @@ ComputationSliceState::getSourceAsConstraints(FlatAffineValueConstraints &cst) {
// Populates 'cst' with FlatAffineValueConstraints which represent slice bounds.
LogicalResult
-ComputationSliceState::getAsConstraints(FlatAffineValueConstraints *cst) {
+ComputationSliceState::getAsConstraints(FlatAffineValueConstraints *cst) const {
assert(!lbOperands.empty());
// Adds src 'ivs' as dimension variables in 'cst'.
unsigned numDims = ivs.size();