[polly] r310209 - Move ScopInfo::getDomain(), getDomainSpace(), getDomainId() to isl++

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 09:39:52 PDT 2017


Author: grosser
Date: Sun Aug  6 09:39:52 2017
New Revision: 310209

URL: http://llvm.org/viewvc/llvm-project?rev=310209&view=rev
Log:
Move ScopInfo::getDomain(), getDomainSpace(), getDomainId() to isl++

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/DependenceInfo.cpp
    polly/trunk/lib/Analysis/PolyhedralInfo.cpp
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/lib/CodeGen/BlockGenerators.cpp
    polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
    polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
    polly/trunk/lib/Exchange/JSONExporter.cpp
    polly/trunk/lib/Transform/ScheduleOptimizer.cpp
    polly/trunk/lib/Transform/Simplify.cpp
    polly/trunk/lib/Transform/ZoneAlgo.cpp

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug  6 09:39:52 2017
@@ -1315,17 +1315,17 @@ public:
   /// Get the iteration domain of this ScopStmt.
   ///
   /// @return The iteration domain of this ScopStmt.
-  __isl_give isl_set *getDomain() const;
+  isl::set getDomain() const;
 
   /// Get the space of the iteration domain
   ///
   /// @return The space of the iteration domain
-  __isl_give isl_space *getDomainSpace() const;
+  isl::space getDomainSpace() const;
 
   /// Get the id of the iteration domain space
   ///
   /// @return The id of the iteration domain space
-  __isl_give isl_id *getDomainId() const;
+  isl::id getDomainId() const;
 
   /// Get an isl string representing this domain.
   std::string getDomainStr() const;

Modified: polly/trunk/lib/Analysis/DependenceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/DependenceInfo.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/DependenceInfo.cpp (original)
+++ polly/trunk/lib/Analysis/DependenceInfo.cpp Sun Aug  6 09:39:52 2017
@@ -133,7 +133,7 @@ static void collectInfo(Scop &S, isl_uni
 
   for (ScopStmt &Stmt : S) {
     for (MemoryAccess *MA : Stmt) {
-      isl_set *domcp = Stmt.getDomain();
+      isl_set *domcp = Stmt.getDomain().release();
       isl_map *accdom = MA->getAccessRelation().release();
 
       accdom = isl_map_intersect_domain(accdom, domcp);

Modified: polly/trunk/lib/Analysis/PolyhedralInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/PolyhedralInfo.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/PolyhedralInfo.cpp (original)
+++ polly/trunk/lib/Analysis/PolyhedralInfo.cpp Sun Aug  6 09:39:52 2017
@@ -138,8 +138,8 @@ __isl_give isl_union_map *PolyhedralInfo
 
       ScheduleMap = isl_map_project_out(ScheduleMap, isl_dim_out, CurrDim + 1,
                                         MaxDim - CurrDim - 1);
-      ScheduleMap =
-          isl_map_set_tuple_id(ScheduleMap, isl_dim_in, SS.getDomainId());
+      ScheduleMap = isl_map_set_tuple_id(ScheduleMap, isl_dim_in,
+                                         SS.getDomainId().release());
       Schedule =
           isl_union_map_union(Schedule, isl_union_map_from_map(ScheduleMap));
     }

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug  6 09:39:52 2017
@@ -673,7 +673,7 @@ MemoryAccess::applyScheduleToAccessRelat
   isl::map Schedule, ScheduledAccRel;
   isl::union_set UDomain;
 
-  UDomain = isl::manage(getStatement()->getDomain());
+  UDomain = getStatement()->getDomain();
   USchedule = USchedule.intersect_domain(UDomain);
   Schedule = isl::map::from_union_map(USchedule);
   ScheduledAccRel = getAddressFunction().apply_domain(Schedule);
@@ -706,10 +706,10 @@ std::string MemoryAccess::getAccessRelat
 
 isl::basic_map MemoryAccess::createBasicAccessMap(ScopStmt *Statement) {
   isl::space Space = isl::space(Statement->getIslCtx(), 0, 1);
-  Space = Space.align_params(isl::manage(Statement->getDomainSpace()));
+  Space = Space.align_params(Statement->getDomainSpace());
 
   return isl::basic_map::from_domain_and_range(
-      isl::basic_set::universe(isl::manage(Statement->getDomainSpace())),
+      isl::basic_set::universe(Statement->getDomainSpace()),
       isl::basic_set::universe(Space));
 }
 
@@ -755,7 +755,7 @@ void MemoryAccess::assumeNoOutOfBound()
   }
 
   Outside = Outside.apply(getAccessRelation().reverse());
-  Outside = Outside.intersect(give(Statement->getDomain()));
+  Outside = Outside.intersect(Statement->getDomain());
   Outside = Outside.params();
 
   // Remove divs to avoid the construction of overly complicated assumptions.
@@ -768,7 +768,7 @@ void MemoryAccess::assumeNoOutOfBound()
                         ? getAccessInstruction()->getDebugLoc()
                         : DebugLoc();
   if (!PollyPreciseInbounds)
-    Outside = Outside.gist_params(give(Statement->getDomain()).params());
+    Outside = Outside.gist_params(Statement->getDomain().params());
   Statement->getParent()->recordAssumption(INBOUNDS, Outside.release(), Loc,
                                            AS_ASSUMPTION);
 }
@@ -794,7 +794,7 @@ void MemoryAccess::buildMemIntrinsicAcce
   SubscriptMap = SubscriptMap.align_params(LengthMap.get_space());
   LengthMap = LengthMap.sum(SubscriptMap);
   AccessRelation =
-      LengthMap.set_tuple_id(isl::dim::in, give(getStatement()->getDomainId()));
+      LengthMap.set_tuple_id(isl::dim::in, getStatement()->getDomainId());
 }
 
 void MemoryAccess::computeBoundsOnAccessRelation(unsigned ElementSize) {
@@ -894,12 +894,11 @@ void MemoryAccess::foldAccessRelation()
   }
 
   isl::id BaseAddrId = getScopArrayInfo()->getBasePtrId();
-  isl::space Space = give(Statement->getDomainSpace());
+  isl::space Space = Statement->getDomainSpace();
   NewAccessRelation = NewAccessRelation.set_tuple_id(
       isl::dim::in, Space.get_tuple_id(isl::dim::set));
   NewAccessRelation = NewAccessRelation.set_tuple_id(isl::dim::out, BaseAddrId);
-  NewAccessRelation =
-      NewAccessRelation.gist_domain(give(Statement->getDomain()));
+  NewAccessRelation = NewAccessRelation.gist_domain(Statement->getDomain());
 
   // Access dimension folding might in certain cases increase the number of
   // disjuncts in the memory access, which can possibly complicate the generated
@@ -979,13 +978,12 @@ void MemoryAccess::buildAccessRelation(c
     AccessRelation = AccessRelation.flat_range_product(SubscriptMap);
   }
 
-  Space = isl::manage(Statement->getDomainSpace());
+  Space = Statement->getDomainSpace();
   AccessRelation = AccessRelation.set_tuple_id(
       isl::dim::in, Space.get_tuple_id(isl::dim::set));
   AccessRelation = AccessRelation.set_tuple_id(isl::dim::out, BaseAddrId);
 
-  AccessRelation =
-      AccessRelation.gist_domain(isl::manage(Statement->getDomain()));
+  AccessRelation = AccessRelation.gist_domain(Statement->getDomain());
 }
 
 MemoryAccess::MemoryAccess(ScopStmt *Stmt, Instruction *AccessInst,
@@ -1082,7 +1080,7 @@ LLVM_DUMP_METHOD void MemoryAccess::dump
 isl::pw_aff MemoryAccess::getPwAff(const SCEV *E) {
   auto *Stmt = getStatement();
   PWACtx PWAC = Stmt->getParent()->getPwAff(E, Stmt->getEntryBlock());
-  isl::set StmtDom = isl::manage(getStatement()->getDomain());
+  isl::set StmtDom = getStatement()->getDomain();
   StmtDom = StmtDom.reset_tuple_id();
   isl::set NewInvalidDom = StmtDom.intersect(isl::manage(PWAC.second));
   InvalidDomain = InvalidDomain.unite(NewInvalidDom);
@@ -1172,15 +1170,14 @@ void MemoryAccess::setNewAccessRelation(
   // Check domain space compatibility.
   isl::space NewSpace = NewAccess.get_space();
   isl::space NewDomainSpace = NewSpace.domain();
-  isl::space OriginalDomainSpace =
-      isl::manage(getStatement()->getDomainSpace());
+  isl::space OriginalDomainSpace = getStatement()->getDomainSpace();
   assert(OriginalDomainSpace.has_equal_tuples(NewDomainSpace));
 
   // Reads must be executed unconditionally. Writes might be executed in a
   // subdomain only.
   if (isRead()) {
     // Check whether there is an access for every statement instance.
-    isl::set StmtDomain = isl::manage(getStatement()->getDomain());
+    isl::set StmtDomain = getStatement()->getDomain();
     StmtDomain = StmtDomain.intersect_params(
         isl::manage(getStatement()->getParent()->getContext()));
     isl::set NewDomain = NewAccess.domain();
@@ -1211,12 +1208,12 @@ void MemoryAccess::setNewAccessRelation(
          "Access dims must match array dims");
 #endif
 
-  NewAccess = NewAccess.gist_domain(isl::manage(getStatement()->getDomain()));
+  NewAccess = NewAccess.gist_domain(getStatement()->getDomain());
   NewAccessRelation = NewAccess;
 }
 
 bool MemoryAccess::isLatestPartialAccess() const {
-  isl::set StmtDom = give(getStatement()->getDomain());
+  isl::set StmtDom = getStatement()->getDomain();
   isl::set AccDom = getLatestAccessRelation().domain();
 
   return isl_set_is_subset(StmtDom.keep(), AccDom.keep()) == isl_bool_false;
@@ -1225,11 +1222,11 @@ bool MemoryAccess::isLatestPartialAccess
 //===----------------------------------------------------------------------===//
 
 __isl_give isl_map *ScopStmt::getSchedule() const {
-  isl_set *Domain = getDomain();
+  isl_set *Domain = getDomain().release();
   if (isl_set_is_empty(Domain)) {
     isl_set_free(Domain);
-    return isl_map_from_aff(
-        isl_aff_zero_on_domain(isl_local_space_from_space(getDomainSpace())));
+    return isl_map_from_aff(isl_aff_zero_on_domain(
+        isl_local_space_from_space(getDomainSpace().release())));
   }
   auto *Schedule = getParent()->getSchedule();
   if (!Schedule) {
@@ -1241,8 +1238,8 @@ __isl_give isl_map *ScopStmt::getSchedul
   if (isl_union_map_is_empty(Schedule)) {
     isl_set_free(Domain);
     isl_union_map_free(Schedule);
-    return isl_map_from_aff(
-        isl_aff_zero_on_domain(isl_local_space_from_space(getDomainSpace())));
+    return isl_map_from_aff(isl_aff_zero_on_domain(
+        isl_local_space_from_space(getDomainSpace().release())));
   }
   auto *M = isl_map_from_union_map(Schedule);
   M = isl_map_coalesce(M);
@@ -1846,7 +1843,7 @@ void ScopStmt::checkForReductions() {
 
     // And check if the remaining for overlap with other memory accesses.
     isl_map *AllAccsRel = isl_map_union(LoadAccs, StoreAccs);
-    AllAccsRel = isl_map_intersect_domain(AllAccsRel, getDomain());
+    AllAccsRel = isl_map_intersect_domain(AllAccsRel, getDomain().release());
     isl_set *AllAccs = isl_map_range(AllAccsRel);
 
     for (MemoryAccess *MA : MemAccs) {
@@ -1854,7 +1851,7 @@ void ScopStmt::checkForReductions() {
         continue;
 
       isl_map *AccRel = isl_map_intersect_domain(
-          MA->getAccessRelation().release(), getDomain());
+          MA->getAccessRelation().release(), getDomain().release());
       isl_set *Accs = isl_map_range(AccRel);
 
       if (isl_set_has_equal_space(AllAccs, Accs)) {
@@ -1911,15 +1908,11 @@ Loop *ScopStmt::getLoopForDimension(unsi
 
 isl_ctx *ScopStmt::getIslCtx() const { return Parent.getIslCtx(); }
 
-__isl_give isl_set *ScopStmt::getDomain() const { return Domain.copy(); }
+isl::set ScopStmt::getDomain() const { return Domain; }
 
-__isl_give isl_space *ScopStmt::getDomainSpace() const {
-  return Domain.get_space().release();
-}
+isl::space ScopStmt::getDomainSpace() const { return Domain.get_space(); }
 
-__isl_give isl_id *ScopStmt::getDomainId() const {
-  return Domain.get_tuple_id().release();
-}
+isl::id ScopStmt::getDomainId() const { return Domain.get_tuple_id(); }
 
 ScopStmt::~ScopStmt() {}
 
@@ -2554,7 +2547,7 @@ buildMinMaxAccess(isl::set Set, Scop::Mi
 }
 
 static __isl_give isl_set *getAccessDomain(MemoryAccess *MA) {
-  isl_set *Domain = MA->getStatement()->getDomain();
+  isl_set *Domain = MA->getStatement()->getDomain().release();
   Domain = isl_set_project_out(Domain, isl_dim_set, 0, isl_set_n_dim(Domain));
   return isl_set_reset_tuple_id(Domain);
 }
@@ -3328,7 +3321,7 @@ Scop::buildAliasGroupsForAccesses(AliasA
   DenseSet<const ScopArrayInfo *> HasWriteAccess;
   for (ScopStmt &Stmt : *this) {
 
-    isl_set *StmtDomain = Stmt.getDomain();
+    isl_set *StmtDomain = Stmt.getDomain().release();
     bool StmtDomainEmpty = isl_set_is_empty(StmtDomain);
     isl_set_free(StmtDomain);
 
@@ -3887,7 +3880,7 @@ void Scop::addInvariantLoads(ScopStmt &S
 
   // Get the context under which the statement is executed but remove the error
   // context under which this statement is reached.
-  isl_set *DomainCtx = isl_set_params(Stmt.getDomain());
+  isl_set *DomainCtx = isl_set_params(Stmt.getDomain().release());
   DomainCtx = isl_set_subtract(DomainCtx, StmtInvalidCtx.copy());
 
   if (isl_set_n_basic_set(DomainCtx) >= MaxDisjunctsInDomain) {
@@ -4066,7 +4059,7 @@ isl::set Scop::getNonHoistableCtx(Memory
   if (AccessRelation.involves_dims(isl::dim::in, 0, Stmt.getNumIterators()))
     return nullptr;
 
-  AccessRelation = AccessRelation.intersect_domain(give(Stmt.getDomain()));
+  AccessRelation = AccessRelation.intersect_domain(Stmt.getDomain());
   isl::set SafeToLoad;
 
   auto &DL = getFunction().getParent()->getDataLayout();
@@ -4682,7 +4675,7 @@ __isl_give isl_union_set *Scop::getDomai
   isl_union_set *Domain = isl_union_set_empty(EmptySpace);
 
   for (const ScopStmt &Stmt : *this)
-    Domain = isl_union_set_add_set(Domain, Stmt.getDomain());
+    Domain = isl_union_set_add_set(Domain, Stmt.getDomain().release());
 
   return Domain;
 }
@@ -4702,7 +4695,7 @@ Scop::getAccessesOfType(std::function<bo
       if (!Predicate(*MA))
         continue;
 
-      isl_set *Domain = Stmt.getDomain();
+      isl_set *Domain = Stmt.getDomain().release();
       isl_map *AccessDomain = MA->getAccessRelation().release();
       AccessDomain = isl_map_intersect_domain(AccessDomain, Domain);
       Accesses = isl_union_map_add_map(Accesses, AccessDomain);
@@ -4788,7 +4781,8 @@ void Scop::setScheduleTree(__isl_take is
 bool Scop::restrictDomains(__isl_take isl_union_set *Domain) {
   bool Changed = false;
   for (ScopStmt &Stmt : *this) {
-    isl_union_set *StmtDomain = isl_union_set_from_set(Stmt.getDomain());
+    isl_union_set *StmtDomain =
+        isl_union_set_from_set(Stmt.getDomain().release());
     isl_union_set *NewStmtDomain = isl_union_set_intersect(
         isl_union_set_copy(StmtDomain), isl_union_set_copy(Domain));
 
@@ -4804,7 +4798,7 @@ bool Scop::restrictDomains(__isl_take is
     NewStmtDomain = isl_union_set_coalesce(NewStmtDomain);
 
     if (isl_union_set_is_empty(NewStmtDomain)) {
-      Stmt.restrictDomain(isl::set::empty(isl::manage(Stmt.getDomainSpace())));
+      Stmt.restrictDomain(isl::set::empty(Stmt.getDomainSpace()));
       isl_union_set_free(NewStmtDomain);
     } else
       Stmt.restrictDomain(isl::manage(isl_set_from_union_set(NewStmtDomain)));
@@ -4981,7 +4975,7 @@ void Scop::buildSchedule(RegionNode *RN,
   LoopData.NumBlocksProcessed += getNumBlocksInRegionNode(RN);
 
   for (auto *Stmt : getStmtListFor(RN)) {
-    auto *UDomain = isl_union_set_from_set(Stmt->getDomain());
+    auto *UDomain = isl_union_set_from_set(Stmt->getDomain().release());
     auto *StmtSchedule = isl_schedule_from_domain(UDomain);
     LoopData.Schedule = combineInSequence(LoopData.Schedule, StmtSchedule);
   }

Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sun Aug  6 09:39:52 2017
@@ -553,7 +553,7 @@ void BlockGenerator::generateScalarLoads
       continue;
 
 #ifndef NDEBUG
-    auto *StmtDom = Stmt.getDomain();
+    auto *StmtDom = Stmt.getDomain().release();
     auto *AccDom = isl_map_domain(MA->getAccessRelation().release());
     assert(isl_set_is_subset(StmtDom, AccDom) &&
            "Scalar must be loaded in all statement instances");
@@ -575,7 +575,7 @@ void BlockGenerator::generateScalarLoads
 Value *BlockGenerator::buildContainsCondition(ScopStmt &Stmt,
                                               const isl::set &Subdomain) {
   isl::ast_build AstBuild = give(isl_ast_build_copy(Stmt.getAstBuild()));
-  isl::set Domain = give(Stmt.getDomain());
+  isl::set Domain = Stmt.getDomain();
 
   isl::union_map USchedule = AstBuild.get_schedule();
   USchedule = USchedule.intersect_domain(Domain);
@@ -599,7 +599,7 @@ Value *BlockGenerator::buildContainsCond
 void BlockGenerator::generateConditionalExecution(
     ScopStmt &Stmt, const isl::set &Subdomain, StringRef Subject,
     const std::function<void()> &GenThenFunc) {
-  isl::set StmtDom = give(Stmt.getDomain());
+  isl::set StmtDom = Stmt.getDomain();
 
   // Don't call GenThenFunc if it is never executed. An ast index expression
   // might not be defined in this case.

Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Sun Aug  6 09:39:52 2017
@@ -372,7 +372,7 @@ void IslNodeBuilder::createUserVector(__
   ScopStmt *Stmt = (ScopStmt *)isl_id_get_user(Id);
   std::vector<LoopToScevMapT> VLTS(IVS.size());
 
-  isl_union_set *Domain = isl_union_set_from_set(Stmt->getDomain());
+  isl_union_set *Domain = isl_union_set_from_set(Stmt->getDomain().release());
   Schedule = isl_union_map_intersect_domain(Schedule, Domain);
   isl_map *S = isl_map_from_union_map(Schedule);
 
@@ -702,7 +702,7 @@ static bool hasPartialAccesses(__isl_tak
 
                ScopStmt *Stmt =
                    static_cast<ScopStmt *>(isl_id_get_user(Id.keep()));
-               isl::set StmtDom = give(Stmt->getDomain());
+               isl::set StmtDom = Stmt->getDomain();
                for (auto *MA : *Stmt) {
                  if (MA->isLatestPartialAccess())
                    return isl_bool_error;
@@ -811,7 +811,7 @@ IslNodeBuilder::createNewAccesses(ScopSt
 
 #ifndef NDEBUG
     if (MA->isRead()) {
-      auto Dom = Stmt->getDomain();
+      auto Dom = Stmt->getDomain().release();
       auto SchedDom = isl_set_from_union_set(
           isl_union_map_domain(isl_union_map_copy(Schedule)));
       auto AccDom = isl_map_domain(MA->getAccessRelation().release());

Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Sun Aug  6 09:39:52 2017
@@ -287,7 +287,7 @@ static __isl_give isl_id_to_ast_expr *po
 
   for (MemoryAccess *Acc : *Stmt) {
     isl::map AddrFunc = Acc->getAddressFunction();
-    AddrFunc = AddrFunc.intersect_domain(isl::manage(Stmt->getDomain()));
+    AddrFunc = AddrFunc.intersect_domain(Stmt->getDomain());
 
     isl::id RefId = Acc->getId();
     isl::pw_multi_aff PMA = isl::pw_multi_aff::from_map(AddrFunc);
@@ -2542,7 +2542,8 @@ public:
       for (auto &Acc : Stmt)
         if (Acc->getType() == AccessTy) {
           isl_map *Relation = Acc->getAccessRelation().release();
-          Relation = isl_map_intersect_domain(Relation, Stmt.getDomain());
+          Relation =
+              isl_map_intersect_domain(Relation, Stmt.getDomain().release());
 
           isl_space *Space = isl_map_get_space(Relation);
           Space = isl_space_range(Space);
@@ -2717,7 +2718,7 @@ public:
     for (auto &Stmt : *S) {
       gpu_stmt *GPUStmt = &Stmts[i];
 
-      GPUStmt->id = Stmt.getDomainId();
+      GPUStmt->id = Stmt.getDomainId().release();
 
       // We use the pet stmt pointer to keep track of the Polly statements.
       GPUStmt->stmt = (pet_stmt *)&Stmt;
@@ -3239,7 +3240,7 @@ public:
   ///          by @p Stmt.
   __isl_give isl_ast_expr *approxDynamicInst(ScopStmt &Stmt,
                                              __isl_keep isl_ast_build *Build) {
-    auto Iterations = approxPointsInSet(Stmt.getDomain(), Build);
+    auto Iterations = approxPointsInSet(Stmt.getDomain().release(), Build);
 
     long InstCount = 0;
 

Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Sun Aug  6 09:39:52 2017
@@ -367,7 +367,7 @@ bool JSONImporter::importSchedule(Scop &
       return false;
     }
 
-    isl_space *Space = Stmt.getDomainSpace();
+    isl_space *Space = Stmt.getDomainSpace().release();
 
     // Copy the old tuple id. This is necessary to retain the user pointer,
     // that stores the reference to the ScopStmt this schedule belongs to.

Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Sun Aug  6 09:39:52 2017
@@ -1042,7 +1042,7 @@ optimizeDataLayoutMatrMulPattern(isl::sc
                                          MapOldIndVar.dim(isl::dim::out) - 2);
   ExtMap = ExtMap.reverse();
   ExtMap = ExtMap.fix_si(isl::dim::out, MMI.i, 0);
-  auto Domain = isl::manage(Stmt->getDomain());
+  auto Domain = Stmt->getDomain();
 
   // Restrict the domains of the copy statements to only execute when also its
   // originating statement is executed.
@@ -1052,8 +1052,7 @@ optimizeDataLayoutMatrMulPattern(isl::sc
       Domain.copy());
   ExtMap = ExtMap.set_tuple_id(isl::dim::out, isl::manage(DomainId.copy()));
   ExtMap = ExtMap.intersect_range(isl::manage(Domain.copy()));
-  ExtMap =
-      ExtMap.set_tuple_id(isl::dim::out, isl::manage(NewStmt->getDomainId()));
+  ExtMap = ExtMap.set_tuple_id(isl::dim::out, NewStmt->getDomainId());
   Node = createExtensionNode(Node, ExtMap);
 
   // Create a copy statement that corresponds to the memory access
@@ -1080,8 +1079,7 @@ optimizeDataLayoutMatrMulPattern(isl::sc
   // originating statement is executed.
   ExtMap = ExtMap.set_tuple_id(isl::dim::out, DomainId);
   ExtMap = ExtMap.intersect_range(Domain);
-  ExtMap =
-      ExtMap.set_tuple_id(isl::dim::out, isl::manage(NewStmt->getDomainId()));
+  ExtMap = ExtMap.set_tuple_id(isl::dim::out, NewStmt->getDomainId());
   Node = createExtensionNode(Node, ExtMap);
   return Node.child(0).child(0).child(0).child(0);
 }

Modified: polly/trunk/lib/Transform/Simplify.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/Simplify.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Transform/Simplify.cpp (original)
+++ polly/trunk/lib/Transform/Simplify.cpp Sun Aug  6 09:39:52 2017
@@ -172,7 +172,7 @@ private:
   /// removed) and the overwrite.
   void removeOverwrites() {
     for (auto &Stmt : *S) {
-      auto Domain = give(Stmt.getDomain());
+      isl::set Domain = Stmt.getDomain();
       isl::union_map WillBeOverwritten =
           isl::union_map::empty(give(S->getParamSpace()));
 
@@ -233,7 +233,7 @@ private:
   void coalesceWrites() {
     for (auto &Stmt : *S) {
       isl::set Domain =
-          give(Stmt.getDomain()).intersect_params(give(S->getContext()));
+          Stmt.getDomain().intersect_params(give(S->getContext()));
 
       // We let isl do the lookup for the same-value condition. For this, we
       // wrap llvm::Value into an isl::set such that isl can do the lookup in
@@ -427,7 +427,7 @@ private:
         return Result;
       };
 
-      isl::set Domain = give(Stmt.getDomain());
+      isl::set Domain = Stmt.getDomain();
       Domain = Domain.intersect_params(give(S->getContext()));
 
       // List of element reads that still have the same value while iterating

Modified: polly/trunk/lib/Transform/ZoneAlgo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ZoneAlgo.cpp?rev=310209&r1=310208&r2=310209&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ZoneAlgo.cpp (original)
+++ polly/trunk/lib/Transform/ZoneAlgo.cpp Sun Aug  6 09:39:52 2017
@@ -386,8 +386,8 @@ bool ZoneAlgorithm::isCompatibleScop() {
 }
 
 isl::map ZoneAlgorithm::getScatterFor(ScopStmt *Stmt) const {
-  auto ResultSpace = give(isl_space_map_from_domain_and_range(
-      Stmt->getDomainSpace(), ScatterSpace.copy()));
+  isl::space ResultSpace = give(isl_space_map_from_domain_and_range(
+      Stmt->getDomainSpace().release(), ScatterSpace.copy()));
   return give(isl_union_map_extract_map(Schedule.keep(), ResultSpace.take()));
 }
 
@@ -411,7 +411,7 @@ isl::map ZoneAlgorithm::getScatterFor(is
 }
 
 isl::set ZoneAlgorithm::getDomainFor(ScopStmt *Stmt) const {
-  return give(isl_set_remove_redundancies(Stmt->getDomain()));
+  return Stmt->getDomain().remove_redundancies();
 }
 
 isl::set ZoneAlgorithm::getDomainFor(MemoryAccess *MA) const {




More information about the llvm-commits mailing list