[llvm-commits] [polly] r141254 - in /polly/trunk: include/polly/ScopInfo.h lib/Analysis/Dependences.cpp lib/Analysis/ScopInfo.cpp lib/Analysis/ScopPass.cpp lib/Cloog.cpp lib/Exchange/JSONExporter.cpp

Tobias Grosser grosser at fim.uni-passau.de
Wed Oct 5 17:03:54 PDT 2011


Author: grosser
Date: Wed Oct  5 19:03:54 2011
New Revision: 141254

URL: http://llvm.org/viewvc/llvm-project?rev=141254&view=rev
Log:
ScopInfo: Get the isl_ctx always with getIslCtx()

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/Dependences.cpp
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/lib/Analysis/ScopPass.cpp
    polly/trunk/lib/Cloog.cpp
    polly/trunk/lib/Exchange/JSONExporter.cpp

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Oct  5 19:03:54 2011
@@ -282,7 +282,7 @@
   ~ScopStmt();
 
   /// @brief Get an isl_ctx pointer.
-  isl_ctx *getIslContext();
+  isl_ctx *getIslCtx() const;
 
   /// @brief Get the iteration domain of this ScopStmt.
   ///
@@ -536,7 +536,7 @@
   /// @brief Get the isl context of this static control part.
   ///
   /// @return The isl context of this static control part.
-  isl_ctx *getCtx() const;
+  isl_ctx *getIslCtx() const;
 };
 
 /// @brief Print Scop scop to raw_ostream O.

Modified: polly/trunk/lib/Analysis/Dependences.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/Dependences.cpp?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/Dependences.cpp (original)
+++ polly/trunk/lib/Analysis/Dependences.cpp Wed Oct  5 19:03:54 2011
@@ -302,7 +302,7 @@
 
   isl_union_set *distance_waw = isl_union_map_deltas(restrictedDeps_waw);
 
-  isl_space *Space = isl_space_set_alloc(S->getCtx(), 0, parallelDimension);
+  isl_space *Space = isl_space_set_alloc(S->getIslCtx(), 0, parallelDimension);
 
   // [0, 0, 0, 0] - All zero
   isl_basic_set *allZeroBS = isl_basic_set_universe(isl_space_copy(Space));

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Oct  5 19:03:54 2011
@@ -115,7 +115,7 @@
   }
 
   SCEVAffinator(const ScopStmt *stmt, const Value *baseAddress) :
-    ctx(stmt->getParent()->getCtx()),
+    ctx(stmt->getIslCtx()),
     NbLoopSpaces(stmt->getNumIterators()),
     scop(stmt->getParent()),
     baseAddress(baseAddress) {};
@@ -300,7 +300,7 @@
 }
 
 isl_basic_map *MemoryAccess::createBasicAccessMap(ScopStmt *Statement) {
-  isl_space *Space = isl_space_alloc(Statement->getIslContext(), 0,
+  isl_space *Space = isl_space_alloc(Statement->getIslCtx(), 0,
                                     Statement->getNumIterators(), 1);
   setBaseName();
 
@@ -520,7 +520,7 @@
 void ScopStmt::buildScattering(SmallVectorImpl<unsigned> &Scatter) {
   unsigned NumberOfIterators = getNumIterators();
   unsigned ScatSpace = Parent.getMaxLoopDepth() * 2 + 1;
-  isl_space *Space = isl_space_alloc(Parent.getCtx(), 0, NumberOfIterators,
+  isl_space *Space = isl_space_alloc(getIslCtx(), 0, NumberOfIterators,
                                      ScatSpace);
   Space = isl_space_set_tuple_name(Space, isl_dim_out, "scattering");
   Space = isl_space_set_tuple_name(Space, isl_dim_in, getBaseName());
@@ -637,7 +637,7 @@
 }
 
 void ScopStmt::buildIterationDomainFromLoops(TempScop &tempScop) {
-  isl_space *Space = isl_space_set_alloc(getIslContext(), 0, getNumIterators());
+  isl_space *Space = isl_space_set_alloc(getIslCtx(), 0, getNumIterators());
   Space = isl_space_set_tuple_name(Space, isl_dim_set, getBaseName());
 
   Domain = isl_set_universe(isl_space_copy(Space));
@@ -734,14 +734,13 @@
 
   // Build iteration domain.
   std::string IterationDomainString = "{[i0] : i0 = 0}";
-  Domain = isl_set_read_from_str(Parent.getCtx(),
-                                 IterationDomainString.c_str());
+  Domain = isl_set_read_from_str(getIslCtx(), IterationDomainString.c_str());
   Domain = isl_set_set_tuple_name(Domain, getBaseName());
   Domain = isl_set_align_params(Domain, parent.getParamSpace());
 
   // Build scattering.
   unsigned ScatSpace = Parent.getMaxLoopDepth() * 2 + 1;
-  isl_space *Space = isl_space_alloc(Parent.getCtx(), 0, 1, ScatSpace);
+  isl_space *Space = isl_space_alloc(getIslCtx(), 0, 1, ScatSpace);
   Space = isl_space_set_tuple_name(Space, isl_dim_out, "scattering");
   Space = isl_space_set_tuple_name(Space, isl_dim_in, getBaseName());
   isl_basic_map *bmap = isl_basic_map_universe(isl_space_copy(Space));
@@ -825,8 +824,8 @@
   return cast<SCEVAddRecExpr>(getParent()->getSE()->getSCEV(PN));
 }
 
-isl_ctx *ScopStmt::getIslContext() {
-  return Parent.getCtx();
+isl_ctx *ScopStmt::getIslCtx() const {
+  return Parent.getIslCtx();
 }
 
 isl_set *ScopStmt::getDomain() const {
@@ -970,7 +969,7 @@
 
 void Scop::dump() const { print(dbgs()); }
 
-isl_ctx *Scop::getCtx() const { return isl_set_get_ctx(Context); }
+isl_ctx *Scop::getIslCtx() const { return isl_set_get_ctx(Context); }
 
 ScalarEvolution *Scop::getSE() const { return SE; }
 

Modified: polly/trunk/lib/Analysis/ScopPass.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopPass.cpp?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopPass.cpp (original)
+++ polly/trunk/lib/Analysis/ScopPass.cpp Wed Oct  5 19:03:54 2011
@@ -28,7 +28,7 @@
 
 isl_ctx *ScopPass::getIslContext() {
   assert(S && "Not in on a Scop!");
-  return S->getCtx();
+  return S->getIslCtx();
 }
 
 void ScopPass::print(raw_ostream &OS, const Module *M) const {

Modified: polly/trunk/lib/Cloog.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Cloog.cpp?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/lib/Cloog.cpp (original)
+++ polly/trunk/lib/Cloog.cpp Wed Oct  5 19:03:54 2011
@@ -62,7 +62,7 @@
 };
 
 Cloog::Cloog(Scop *Scop) : S(Scop) {
-  State = cloog_isl_state_malloc(Scop->getCtx());
+  State = cloog_isl_state_malloc(Scop->getIslCtx());
   buildCloogOptions();
   ClastRoot = cloog_clast_create_from_input(buildCloogInput(), Options);
 }

Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=141254&r1=141253&r2=141254&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Wed Oct  5 19:03:54 2011
@@ -236,7 +236,7 @@
       continue;
     Json::Value schedule = jscop["statements"][index]["schedule"];
 
-    isl_map *m = isl_map_read_from_str(S->getCtx(), schedule.asCString());
+    isl_map *m = isl_map_read_from_str(S->getIslCtx(), schedule.asCString());
     NewScattering[*SI] = m;
     index++;
   }
@@ -266,7 +266,7 @@
          ME = Stmt->memacc_end(); MI != ME; ++MI) {
       Json::Value accesses = jscop["statements"][statementIdx]
                                   ["accesses"][memoryAccessIdx]["relation"];
-      isl_map *newAccessMap = isl_map_read_from_str(S->getCtx(),
+      isl_map *newAccessMap = isl_map_read_from_str(S->getIslCtx(),
                                                     accesses.asCString());
       isl_map *currentAccessMap = (*MI)->getAccessFunction();
       if (!isl_map_has_equal_space(currentAccessMap, newAccessMap)) {





More information about the llvm-commits mailing list