forked from OSchip/llvm-project
Always export the latest memory access relations
This allows us to export the results from transformations such as DeLICM. llvm-svn: 307641
This commit is contained in:
parent
a2e5ecc1f3
commit
6a4c12fb33
|
@ -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.
|
||||
///
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue