[polly] r307641 - Always export the latest memory access relations

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 03:10:13 PDT 2017


Author: grosser
Date: Tue Jul 11 03:10:13 2017
New Revision: 307641

URL: http://llvm.org/viewvc/llvm-project?rev=307641&view=rev
Log:
Always export the latest memory access relations

This allows us to export the results from transformations such as DeLICM.

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/ScopInfo.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=307641&r1=307640&r2=307641&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Tue Jul 11 03:10:13 2017
@@ -843,6 +843,9 @@ public:
   /// Get an isl string representing a new access function, if available.
   std::string getNewAccessRelationStr() const;
 
+  /// Get an isl string representing the latest access relation.
+  std::string getAccessRelationStr() const;
+
   /// Get the original base address of this access (e.g. A for A[i+j]) when
   /// detected.
   ///

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=307641&r1=307640&r2=307641&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue Jul 11 03:10:13 2017
@@ -710,6 +710,10 @@ std::string MemoryAccess::getNewAccessRe
   return stringFromIslObj(NewAccessRelation);
 }
 
+std::string MemoryAccess::getAccessRelationStr() const {
+  return isl::manage(getAccessRelation()).to_str();
+}
+
 __isl_give isl_basic_map *
 MemoryAccess::createBasicAccessMap(ScopStmt *Statement) {
   isl_space *Space = isl_space_set_alloc(Statement->getIslCtx(), 0, 1);

Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=307641&r1=307640&r2=307641&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Tue Jul 11 03:10:13 2017
@@ -202,7 +202,7 @@ Json::Value JSONExporter::getJSON(Scop &
       Json::Value access;
 
       access["kind"] = MA->isRead() ? "read" : "write";
-      access["relation"] = MA->getOriginalAccessRelationStr();
+      access["relation"] = MA->getAccessRelationStr();
 
       statement["accesses"].append(access);
     }




More information about the llvm-commits mailing list