diff options
| author | Tobias Grosser <tobias@grosser.es> | 2015-11-12 14:07:13 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2015-11-12 14:07:13 +0000 |
| commit | 2ac2338a039fc5d469e769c4b917e60249655dc6 (patch) | |
| tree | 3e398b67282e1766a312f0163d3acc03fdc4ce92 | |
| parent | e5a3514e4a9144481ab05786721eb95f1e566415 (diff) | |
| download | bcm5719-llvm-2ac2338a039fc5d469e769c4b917e60249655dc6.tar.gz bcm5719-llvm-2ac2338a039fc5d469e769c4b917e60249655dc6.zip | |
ScopInfo: Add function to retrieve all memory accesses in a scop
llvm-svn: 252894
| -rw-r--r-- | polly/include/polly/ScopInfo.h | 3 | ||||
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index c5ff7f6e005..32e7f5f5a82 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -1631,6 +1631,9 @@ public: /// @brief Get a union map of all reads performed in the SCoP. __isl_give isl_union_map *getReads(); + /// @brief Get a union map of all memory accesses performed in the SCoP. + __isl_give isl_union_map *getAccesses(); + /// @brief Get the schedule of all the statements in the SCoP. __isl_give isl_union_map *getSchedule() const; diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 47fffc3b982..83f797feb7c 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -3153,6 +3153,10 @@ __isl_give isl_union_map *Scop::getReads() { return getAccessesOfType([](MemoryAccess &MA) { return MA.isRead(); }); } +__isl_give isl_union_map *Scop::getAccesses() { + return getAccessesOfType([](MemoryAccess &MA) { return true; }); +} + __isl_give isl_union_map *Scop::getSchedule() const { auto Tree = getScheduleTree(); auto S = isl_schedule_get_map(Tree); |

