<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 27, 2016 at 2:04 PM, Tobias Grosser via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: grosser<br>
Date: Sat Feb 27 00:04:40 2016<br>
New Revision: 262113<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=262113&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=262113&view=rev</a><br>
Log:<br>
ScopInfo: Add function to invalidate ScopArrayInfo object<br>
<br>
In case the underlying basepointer of a ScopArrayInfo object is moved to another<br>
module while the scop is still processed is it necessary to free dependent<br>
ScopArrayInfo objects as they might otherwise be looked accidentally when a<br>
new llvm basepointer value is reassigned the very same memory location as the<br>
llvm value that has been moved earlier.<br>
<br>
This function is not yet used in Polly itself, but is useful for external users.<br>
<br>
Modified:<br>
    polly/trunk/include/polly/ScopInfo.h<br>
<br>
Modified: polly/trunk/include/polly/ScopInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=262113&r1=262112&r2=262113&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=262113&r1=262112&r2=262113&view=diff</a><br>
==============================================================================<br>
--- polly/trunk/include/polly/ScopInfo.h (original)<br>
+++ polly/trunk/include/polly/ScopInfo.h Sat Feb 27 00:04:40 2016<br>
@@ -1931,6 +1931,14 @@ public:<br>
   const ScopArrayInfo *getScopArrayInfo(Value *BasePtr,<br>
                                         ScopArrayInfo::MemoryKind Kind);<br>
<br>
+  /// @brief Invalidate ScopArrayInfo object for base address.<br>
+  ///<br>
+  /// @param BasePtr The base pointer of the ScopArrayInfo object to invalidate.<br>
+  /// @param Kind    The Kind of the ScopArrayInfo object.<br>
+  void invalidateScopArrayInfo(Value *BasePtr, ScopArrayInfo::MemoryKind Kind) {<br>
+    ScopArrayInfoMap.erase(std::make_pair(BasePtr, Kind));<br></blockquote><div>Can we use a PointerIntPair as the key here instead? the BasePtr should be already guarded by the AssertingVH inside ScopArrayInfo.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+  }<br>
+<br>
   void setContext(isl_set *NewContext);<br>
<br>
   /// @brief Align the parameters in the statement to the scop context<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>