diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-07-23 04:08:59 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-07-23 04:08:59 +0000 |
commit | 1959dbda7582b2dd5f7d9e4cb39025e6842e8a29 (patch) | |
tree | dcb4dfc8f5d7aa62c09e311e68333952ef396459 | |
parent | 3b196131b547fe4f2970e07275648a772034c4d8 (diff) | |
download | bcm5719-llvm-1959dbda7582b2dd5f7d9e4cb39025e6842e8a29.tar.gz bcm5719-llvm-1959dbda7582b2dd5f7d9e4cb39025e6842e8a29.zip |
Move MemoryAccess::get*ArrayId to isl++
llvm-svn: 308843
-rw-r--r-- | polly/include/polly/ScopInfo.h | 6 | ||||
-rw-r--r-- | polly/lib/Analysis/DependenceInfo.cpp | 2 | ||||
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 18 |
3 files changed, 12 insertions, 14 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 96d2edbf8fe..21110bf10b2 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 739aebad5b4..21da29196b1 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 6689f412388..6defb4f1bb9 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<ScopArrayInfo *>(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<ScopArrayInfo *>(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 { |