diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 78f649f2fd85..1b78efca60ac 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -2128,12 +2128,12 @@ public: /// @brief Return the domain of @p Stmt. /// /// @param Stmt The statement for which the conditions should be returned. - __isl_give isl_set *getDomainConditions(ScopStmt *Stmt); + __isl_give isl_set *getDomainConditions(const ScopStmt *Stmt) const; /// @brief Return the domain of @p BB. /// /// @param BB The block for which the conditions should be returned. - __isl_give isl_set *getDomainConditions(BasicBlock *BB); + __isl_give isl_set *getDomainConditions(BasicBlock *BB) const; /// @brief Get a union set containing the iteration domains of all statements. __isl_give isl_union_set *getDomains() const; diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 438e380a4932..f2ebce88dc66 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2179,11 +2179,11 @@ static inline __isl_give isl_set *addDomainDimId(__isl_take isl_set *Domain, return isl_set_set_dim_id(Domain, isl_dim_set, Dim, DimId); } -__isl_give isl_set *Scop::getDomainConditions(ScopStmt *Stmt) { +__isl_give isl_set *Scop::getDomainConditions(const ScopStmt *Stmt) const { return getDomainConditions(Stmt->getEntryBlock()); } -__isl_give isl_set *Scop::getDomainConditions(BasicBlock *BB) { +__isl_give isl_set *Scop::getDomainConditions(BasicBlock *BB) const { auto DIt = DomainMap.find(BB); if (DIt != DomainMap.end()) return isl_set_copy(DIt->getSecond());