[polly] r310228 - [ScopInfo] Move Scop::getAssumedContext to isl++ [NFC]

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


Author: grosser
Date: Sun Aug  6 14:42:09 2017
New Revision: 310228

URL: http://llvm.org/viewvc/llvm-project?rev=310228&view=rev
Log:
[ScopInfo] Move Scop::getAssumedContext to isl++ [NFC]

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

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=310228&r1=310227&r2=310228&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug  6 14:42:09 2017
@@ -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.
   ///

Modified: polly/trunk/lib/Analysis/DependenceInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/DependenceInfo.cpp?rev=310228&r1=310227&r2=310228&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/DependenceInfo.cpp (original)
+++ polly/trunk/lib/Analysis/DependenceInfo.cpp Sun Aug  6 14:42:09 2017
@@ -178,8 +178,8 @@ static void collectInfo(Scop &S, isl_uni
           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);

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310228&r1=310227&r2=310228&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug  6 14:42:09 2017
@@ -4301,9 +4301,9 @@ isl::space Scop::getFullParamSpace() con
   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 ScalarsAreU
 }
 
 bool Scop::hasFeasibleRuntimeContext() const {
-  auto *PositiveContext = getAssumedContext();
+  auto *PositiveContext = getAssumedContext().release();
   auto *NegativeContext = getInvalidContext();
   PositiveContext =
       addNonEmptyDomainConstraints(isl::manage(PositiveContext)).release();

Modified: polly/trunk/lib/CodeGen/IslAst.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslAst.cpp?rev=310228&r1=310227&r2=310228&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslAst.cpp (original)
+++ polly/trunk/lib/CodeGen/IslAst.cpp Sun Aug  6 14:42:09 2017
@@ -345,7 +345,8 @@ IslAst::buildRunCondition(Scop &S, __isl
   // 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 {




More information about the llvm-commits mailing list