[polly] r261401 - Assign meaningful name to MemoryAccess. NFC
Hongbin Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 19:40:16 PST 2016
Author: ether
Date: Fri Feb 19 21:40:15 2016
New Revision: 261401
URL: http://llvm.org/viewvc/llvm-project?rev=261401&view=rev
Log:
Assign meaningful name to MemoryAccess. NFC
Now the name of MemoryAccess is <StatementName>_[Read|Write|MayWrite]<Number>_<BaseName>,
e.g. Stmt_for_body_4_Read0_MemRef_A
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=261401&r1=261400&r2=261401&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Fri Feb 19 21:40:15 2016
@@ -1155,6 +1155,7 @@ public:
iterator end() { return MemAccs.end(); }
const_iterator begin() const { return MemAccs.begin(); }
const_iterator end() const { return MemAccs.end(); }
+ size_t size() const { return MemAccs.size(); }
unsigned getNumParams() const;
unsigned getNumIterators() const;
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=261401&r1=261400&r2=261401&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Feb 19 21:40:15 2016
@@ -775,8 +775,11 @@ MemoryAccess::MemoryAccess(ScopStmt *Stm
AccessValue(AccessValue), IsAffine(Affine),
Subscripts(Subscripts.begin(), Subscripts.end()), AccessRelation(nullptr),
NewAccessRelation(nullptr) {
+ static const std::string TypeStrings[] = {"", "_Read", "_Write", "_MayWrite"};
+ const std::string Access = TypeStrings[Type] + utostr(Stmt->size()) + "_";
- std::string IdName = "__polly_array_ref";
+ std::string IdName =
+ getIslCompatibleName(Stmt->getBaseName(), Access, BaseName);
Id = isl_id_alloc(Stmt->getParent()->getIslCtx(), IdName.c_str(), this);
}
More information about the llvm-commits
mailing list