[polly] r309870 - Move ScopStmt::setAccessRelation to isl++

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 12:27:16 PDT 2017


Author: grosser
Date: Wed Aug  2 12:27:16 2017
New Revision: 309870

URL: http://llvm.org/viewvc/llvm-project?rev=309870&view=rev
Log:
Move ScopStmt::setAccessRelation to isl++

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=309870&r1=309869&r2=309870&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Aug  2 12:27:16 2017
@@ -1065,7 +1065,7 @@ public:
   /// object. After the scop has been constructed, the original access relation
   /// should not be changed any more. Instead setNewAccessRelation should
   /// be called.
-  void setAccessRelation(__isl_take isl_map *AccessRelation);
+  void setAccessRelation(isl::map AccessRelation);
 
   /// Set the updated access relation read from JSCOP file.
   void setNewAccessRelation(__isl_take isl_map *NewAccessRelation);

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=309870&r1=309869&r2=309870&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Aug  2 12:27:16 2017
@@ -1162,8 +1162,8 @@ bool MemoryAccess::isStrideOne(isl::map
   return isStrideX(Schedule, 1);
 }
 
-void MemoryAccess::setAccessRelation(__isl_take isl_map *NewAccess) {
-  AccessRelation = isl::manage(NewAccess);
+void MemoryAccess::setAccessRelation(isl::map NewAccess) {
+  AccessRelation = NewAccess;
 }
 
 void MemoryAccess::setNewAccessRelation(__isl_take isl_map *NewAccess) {
@@ -3673,8 +3673,8 @@ void Scop::foldSizeConstantsToRight() {
 
     for (auto &Access : AccessFunctions)
       if (Access->getScopArrayInfo() == Array)
-        Access->setAccessRelation(isl_map_apply_range(
-            Access->getAccessRelation().release(), isl_map_copy(Transform)));
+        Access->setAccessRelation(Access->getAccessRelation().apply_range(
+            isl::manage(isl_map_copy(Transform))));
 
     isl_map_free(Transform);
 
@@ -4188,9 +4188,9 @@ static void replaceBasePtrArrays(Scop *S
       if (Access->getLatestScopArrayInfo() != Old)
         continue;
 
-      isl_id *Id = New->getBasePtrId().release();
-      isl_map *Map = Access->getAccessRelation().release();
-      Map = isl_map_set_tuple_id(Map, isl_dim_out, Id);
+      isl::id Id = New->getBasePtrId();
+      isl::map Map = Access->getAccessRelation();
+      Map = Map.set_tuple_id(isl::dim::out, Id);
       Access->setAccessRelation(Map);
     }
 }




More information about the llvm-commits mailing list