summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorRaghesh Aloor <raghesh.a@gmail.com>2011-08-03 13:47:59 +0000
committerRaghesh Aloor <raghesh.a@gmail.com>2011-08-03 13:47:59 +0000
commit7a04f4f9ba90e552fdb3ded6eba5ddf07c71a5b8 (patch)
tree0727f9cf21979d949d906ecc17d7b44ebc5b37c9 /polly/lib
parent24a01962af6409f9f18403e715db767518c71b43 (diff)
downloadbcm5719-llvm-7a04f4f9ba90e552fdb3ded6eba5ddf07c71a5b8.tar.gz
bcm5719-llvm-7a04f4f9ba90e552fdb3ded6eba5ddf07c71a5b8.zip
Memaccess: Display Changed Access Relation
The changed access relations imported from JSCOP file is shown as output of -analyze pass. llvm-svn: 136774
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp4
-rwxr-xr-xpolly/lib/Exchange/JSONExporter.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 270f9e5fe12..7e6b0428e68 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -337,8 +337,8 @@ bool MemoryAccess::isStrideOne(const isl_set *domainSubset) const {
return isl_set_is_equal(stride, strideZero);
}
-void MemoryAccess::setNewAccessFunction(isl_map *newAccessRelation) {
- newAccessRelation = newAccessRelation;
+void MemoryAccess::setNewAccessFunction(isl_map *newAccess) {
+ newAccessRelation = newAccess;
}
//===----------------------------------------------------------------------===//
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp
index 0a1a0d447fe..ff4803883c3 100755
--- a/polly/lib/Exchange/JSONExporter.cpp
+++ b/polly/lib/Exchange/JSONExporter.cpp
@@ -69,6 +69,7 @@ struct JSONExporter : public ScopPass {
struct JSONImporter : public ScopPass {
static char ID;
Scop *S;
+ std::vector<std::string> newAccessStrings;
explicit JSONImporter() : ScopPass(ID) {}
std::string getFileName(Scop *S) const;
@@ -189,6 +190,9 @@ std::string JSONImporter::getFileName(Scop *S) const {
void JSONImporter::printScop(raw_ostream &OS) const {
S->print(OS);
+ for (std::vector<std::string>::const_iterator I = newAccessStrings.begin(),
+ E = newAccessStrings.end(); I != E; I++)
+ OS << "New access function '" << *I << "'detected in JSCOP file\n";
}
typedef Dependences::StatementToIslMapTy StatementToIslMapTy;
@@ -268,6 +272,7 @@ bool JSONImporter::runOnScop(Scop &scop) {
if (!isl_map_is_equal(newAccessMap, currentAccessMap)) {
// Statistics.
++NewAccessMapFound;
+ newAccessStrings.push_back(accesses.asCString());
(*MI)->setNewAccessFunction(newAccessMap);
}
memoryAccessIdx++;
OpenPOWER on IntegriCloud