[polly] r252894 - ScopInfo: Add function to retrieve all memory accesses in a scop

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 06:07:13 PST 2015


Author: grosser
Date: Thu Nov 12 08:07:13 2015
New Revision: 252894

URL: http://llvm.org/viewvc/llvm-project?rev=252894&view=rev
Log:
ScopInfo: Add function to retrieve all memory accesses in a scop

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=252894&r1=252893&r2=252894&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Thu Nov 12 08:07:13 2015
@@ -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;
 

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=252894&r1=252893&r2=252894&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Thu Nov 12 08:07:13 2015
@@ -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);




More information about the llvm-commits mailing list