aboutsummaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-07-11 10:10:13 +0000
committerTobias Grosser <tobias@grosser.es>2017-07-11 10:10:13 +0000
commit6a4c12fb338f359953ef7d04c9efe680a41392dc (patch)
tree50c35e459d75fd5093035edde3e1b0e868e68a50 /polly
parenta2e5ecc1f39c7b70dd838751eb783300e8a6a02e (diff)
downloadllvm-6a4c12fb338f359953ef7d04c9efe680a41392dc.zip
llvm-6a4c12fb338f359953ef7d04c9efe680a41392dc.tar.gz
llvm-6a4c12fb338f359953ef7d04c9efe680a41392dc.tar.bz2
Always export the latest memory access relations
This allows us to export the results from transformations such as DeLICM. llvm-svn: 307641
Diffstat (limited to 'polly')
-rw-r--r--polly/include/polly/ScopInfo.h3
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp4
-rw-r--r--polly/lib/Exchange/JSONExporter.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index cafc377..5898512 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -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.
///
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 5a32c86..bf69723 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -710,6 +710,10 @@ std::string MemoryAccess::getNewAccessRelationStr() const {
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);
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp
index c79a011..39af8a5 100644
--- a/polly/lib/Exchange/JSONExporter.cpp
+++ b/polly/lib/Exchange/JSONExporter.cpp
@@ -202,7 +202,7 @@ Json::Value JSONExporter::getJSON(Scop &S) const {
Json::Value access;
access["kind"] = MA->isRead() ? "read" : "write";
- access["relation"] = MA->getOriginalAccessRelationStr();
+ access["relation"] = MA->getAccessRelationStr();
statement["accesses"].append(access);
}