<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 10:23 PM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10041-23179021&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=1I8WpxCkoBcjFeZGij8neGMwNJHBQ1nHqMaHhvDFhmo&s=_dMu9mGa6ZWUalb3VLnepbe2ycPLkzyOOSZFnYyKwg4&e=" target="_blank">http://reviews.llvm.org/D10041#179021</a>, @jdoerfert wrote:<br>
<br>
> If you do only worry about the order but you would like to use a list, define the begin()/end() function of a Scop as rbegin()/rend() of the underlying list of scopstmts, that should give us the same order but avoid the deque (which isn't that bad I guess).<br>
<br>
<br>
</span>I decided to stay with the deque as the use of rbegin()/rend() is possible, but would (only slightly) increase complexity. As I doubt this has any performance effect, I decided to minimize complexity.<br>
<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<span><br>
================<br>
Comment at: lib/Analysis/ScopInfo.cpp:2024<br>
@@ -2030,3 +2023,3 @@<br>
 ScopStmt *Scop::getStmtForBasicBlock(BasicBlock *BB) const {<br>
-  const auto &StmtMapIt = StmtMap.find(BB);<br>
+  auto StmtMapIt = StmtMap.find(BB);<br>
   if (StmtMapIt == StmtMap.end())<br>
----------------<br>
</span>jdoerfert wrote:<br>
> Why no const &?<br>
Changed.<br></blockquote><div><br></div><div>I think your change to drop const ref was correct here - find returns an iterator by value, so it's just added complexity/strangeness to then use reference lifetime extension to give it the same semantics as if you'd used a value type instead of a reference type.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10041&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=1I8WpxCkoBcjFeZGij8neGMwNJHBQ1nHqMaHhvDFhmo&s=vSk4F7c217ctAci7yeQzyBQ4yp-CcIRlBqeo5-BIZ7Y&e=" target="_blank">http://reviews.llvm.org/D10041</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=1I8WpxCkoBcjFeZGij8neGMwNJHBQ1nHqMaHhvDFhmo&s=JTcAtSaSPp3p0I5twowlp2Lfyn6g1g5FeoQRatRKxlw&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>