<div dir="ltr">I don't know how StmtSet is populated, but deque is guaranteed to not invalidated references to elements if elements are only inserted at the ends.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 10, 2015 at 9:47 AM, Johannes Doerfert 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jdoerfert<br>
Date: Mon Aug 10 11:47:20 2015<br>
New Revision: 244459<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=244459&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=244459&view=rev</a><br>
Log:<br>
Make StmtSet a list.<br>
<br>
  With a deque (or any other sequential container) it is not sound to<br>
  take the address of the elements when the container is still under<br>
  construction. With a pointer based container this is save.<br>
<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=244459&r1=244458&r2=244459&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=244459&r1=244458&r2=244459&view=diff</a><br>
==============================================================================<br>
--- polly/trunk/include/polly/ScopInfo.h (original)<br>
+++ polly/trunk/include/polly/ScopInfo.h Mon Aug 10 11:47:20 2015<br>
@@ -25,6 +25,7 @@<br>
 #include "llvm/Analysis/RegionPass.h"<br>
 #include "isl/ctx.h"<br>
<br>
+#include <list><br>
 #include <forward_list><br>
 #include <deque><br>
<br>
@@ -752,7 +753,7 @@ private:<br>
   /// Max loop depth.<br>
   unsigned MaxLoopDepth;<br>
<br>
-  typedef std::deque<ScopStmt> StmtSet;<br>
+  typedef std::list<ScopStmt> StmtSet;<br>
   /// The statements in this Scop.<br>
   StmtSet Stmts;<br>
<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><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>