diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 96d2edbf8fe4..21110bf10b2b 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -856,14 +856,14 @@ public: Value *getOriginalBaseAddr() const { return BaseAddr; } /// Get the detection-time base array isl_id for this access. - isl_id *getOriginalArrayId() const; + isl::id getOriginalArrayId() const; /// Get the base array isl_id for this access, modifiable through /// setNewAccessRelation(). - __isl_give isl_id *getLatestArrayId() const; + isl::id getLatestArrayId() const; /// Old name of getOriginalArrayId(). - __isl_give isl_id *getArrayId() const { return getOriginalArrayId(); } + isl::id getArrayId() const { return getOriginalArrayId(); } /// Get the detection-time ScopArrayInfo object for the base address. const ScopArrayInfo *getOriginalScopArrayInfo() const; diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp index 739aebad5b44..21da29196b12 100644 --- a/polly/lib/Analysis/DependenceInfo.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -102,7 +102,7 @@ static __isl_give isl_map *tag(__isl_take isl_map *Relation, static __isl_give isl_map *tag(__isl_take isl_map *Relation, MemoryAccess *MA, Dependences::AnalysisLevel TagLevel) { if (TagLevel == Dependences::AL_Reference) - return tag(Relation, MA->getArrayId()); + return tag(Relation, MA->getArrayId().release()); if (TagLevel == Dependences::AL_Access) return tag(Relation, MA->getId().release()); diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 6689f4123886..6defb4f1bb97 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -643,29 +643,27 @@ static MemoryAccess::ReductionType getReductionType(const BinaryOperator *BinOp, MemoryAccess::~MemoryAccess() { isl_set_free(InvalidDomain); } const ScopArrayInfo *MemoryAccess::getOriginalScopArrayInfo() const { - isl_id *ArrayId = getArrayId(); - void *User = isl_id_get_user(ArrayId); + isl::id ArrayId = getArrayId(); + void *User = ArrayId.get_user(); const ScopArrayInfo *SAI = static_cast(User); - isl_id_free(ArrayId); return SAI; } const ScopArrayInfo *MemoryAccess::getLatestScopArrayInfo() const { - isl_id *ArrayId = getLatestArrayId(); - void *User = isl_id_get_user(ArrayId); + isl::id ArrayId = getLatestArrayId(); + void *User = ArrayId.get_user(); const ScopArrayInfo *SAI = static_cast(User); - isl_id_free(ArrayId); return SAI; } -__isl_give isl_id *MemoryAccess::getOriginalArrayId() const { - return isl_map_get_tuple_id(AccessRelation.get(), isl_dim_out); +isl::id MemoryAccess::getOriginalArrayId() const { + return AccessRelation.get_tuple_id(isl::dim::out); } -__isl_give isl_id *MemoryAccess::getLatestArrayId() const { +isl::id MemoryAccess::getLatestArrayId() const { if (!hasNewAccessRelation()) return getOriginalArrayId(); - return NewAccessRelation.get_tuple_id(isl::dim::out).release(); + return NewAccessRelation.get_tuple_id(isl::dim::out); } isl::map MemoryAccess::getAddressFunction() const {