[ScopInfo] Move Scop::getAssumedContext to isl++ [NFC]
authorTobias Grosser <tobias@grosser.es>
Sun, 6 Aug 2017 21:42:09 +0000 (21:42 +0000)
committerTobias Grosser <tobias@grosser.es>
Sun, 6 Aug 2017 21:42:09 +0000 (21:42 +0000)
llvm-svn: 310228

polly/include/polly/ScopInfo.h
polly/lib/Analysis/DependenceInfo.cpp
polly/lib/Analysis/ScopInfo.cpp
polly/lib/CodeGen/IslAst.cpp

index 88d6b06..8aa1bba 100644 (file)
@@ -2525,7 +2525,7 @@ public:
   /// Get the assumed context for this Scop.
   ///
   /// @return The assumed context of this Scop.
-  __isl_give isl_set *getAssumedContext() const;
+  isl::set getAssumedContext() const;
 
   /// Return true if the optimized SCoP can be executed.
   ///
index 1c0fff3..b1b97a9 100644 (file)
@@ -178,8 +178,8 @@ static void collectInfo(Scop &S, isl_union_map *&Read,
           isl_union_map_add_map(StmtSchedule, Stmt.getSchedule().release());
   }
 
-  StmtSchedule =
-      isl_union_map_intersect_params(StmtSchedule, S.getAssumedContext());
+  StmtSchedule = isl_union_map_intersect_params(
+      StmtSchedule, S.getAssumedContext().release());
   TaggedStmtDomain = isl_union_map_domain(StmtSchedule);
 
   ReductionTagMap = isl_union_map_coalesce(ReductionTagMap);
index 8b6eb9b..50af444 100644 (file)
@@ -4301,9 +4301,9 @@ isl::space Scop::getFullParamSpace() const {
   return Space;
 }
 
-__isl_give isl_set *Scop::getAssumedContext() const {
+isl::set Scop::getAssumedContext() const {
   assert(AssumedContext && "Assumed context not yet built");
-  return isl_set_copy(AssumedContext);
+  return isl::manage(isl_set_copy(AssumedContext));
 }
 
 bool Scop::isProfitable(bool ScalarsAreUnprofitable) const {
@@ -4335,7 +4335,7 @@ bool Scop::isProfitable(bool ScalarsAreUnprofitable) const {
 }
 
 bool Scop::hasFeasibleRuntimeContext() const {
-  auto *PositiveContext = getAssumedContext();
+  auto *PositiveContext = getAssumedContext().release();
   auto *NegativeContext = getInvalidContext();
   PositiveContext =
       addNonEmptyDomainConstraints(isl::manage(PositiveContext)).release();
index af9473e..12685ef 100644 (file)
@@ -345,7 +345,8 @@ IslAst::buildRunCondition(Scop &S, __isl_keep isl_ast_build *Build) {
   // The conditions that need to be checked at run-time for this scop are
   // available as an isl_set in the runtime check context from which we can
   // directly derive a run-time condition.
-  auto *PosCond = isl_ast_build_expr_from_set(Build, S.getAssumedContext());
+  auto *PosCond =
+      isl_ast_build_expr_from_set(Build, S.getAssumedContext().release());
   if (S.hasTrivialInvalidContext()) {
     RunCondition = PosCond;
   } else {