[polly] r262113 - ScopInfo: Add function to invalidate ScopArrayInfo object

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 22:04:40 PST 2016


Author: grosser
Date: Sat Feb 27 00:04:40 2016
New Revision: 262113

URL: http://llvm.org/viewvc/llvm-project?rev=262113&view=rev
Log:
ScopInfo: Add function to invalidate ScopArrayInfo object

In case the underlying basepointer of a ScopArrayInfo object is moved to another
module while the scop is still processed is it necessary to free dependent
ScopArrayInfo objects as they might otherwise be looked accidentally when a
new llvm basepointer value is reassigned the very same memory location as the
llvm value that has been moved earlier.

This function is not yet used in Polly itself, but is useful for external users.

Modified:
    polly/trunk/include/polly/ScopInfo.h

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=262113&r1=262112&r2=262113&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sat Feb 27 00:04:40 2016
@@ -1931,6 +1931,14 @@ public:
   const ScopArrayInfo *getScopArrayInfo(Value *BasePtr,
                                         ScopArrayInfo::MemoryKind Kind);
 
+  /// @brief Invalidate ScopArrayInfo object for base address.
+  ///
+  /// @param BasePtr The base pointer of the ScopArrayInfo object to invalidate.
+  /// @param Kind    The Kind of the ScopArrayInfo object.
+  void invalidateScopArrayInfo(Value *BasePtr, ScopArrayInfo::MemoryKind Kind) {
+    ScopArrayInfoMap.erase(std::make_pair(BasePtr, Kind));
+  }
+
   void setContext(isl_set *NewContext);
 
   /// @brief Align the parameters in the statement to the scop context




More information about the llvm-commits mailing list