<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 3, 2016 at 9:04 PM, George Burgess IV <span dir="ltr"><<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">> <span style="font-size:12.8px">So then isOptimized is "OldDef == Def"?</span><div class="m_-5060271124612864768m_4374970700376705353m_8882905197408969539m_-8615904378607557136m_8100673306657936718m_8183528481088319195m_-4037936198974604955gmail-yj6qo m_-5060271124612864768m_4374970700376705353m_8882905197408969539m_-8615904378607557136m_8100673306657936718m_8183528481088319195m_-4037936198974604955gmail-ajU" style="font-size:12.8px"></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">"OldDef == getDefiningAccess()->getID()", yeah. Pointer equality initially seems a bit harder to get right, since we could delete a Def and, purely by chance, later make a new Def at the same address. Though, maybe I'm just being paranoid. :)</span></div></div></blockquote><div><br></div><div>Right now we don't use the id's for anything but debugging. this would give them sudden semantic meaning.</div><div>Not sure what is best to do here.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">Oh, it's just more efficient than having a densemap based cache if you can make it work</span></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">SGTM; thanks. Until we get an implementation for Defs, would it be better to put these methods on `MemoryUse`, then?</span></div></div></blockquote><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 3, 2016 at 8:24 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Oct 3, 2016 at 5:09 PM, George Burgess IV <span dir="ltr"><<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">george.burgess.iv added inline comments.<br>
<br>
<br>
> MemorySSA.cpp:2185<br>
<span>> +  // Note: Currently, we do not store the optimized def result because we'd need<br>
> +  // a separate field, since we can't use it as the defining access.<br>
> +  if (StartingAccess->isOptimized()<wbr>)<br>
<br>
</span>RE: `Note: ...`: can you bring me through why having this on a Def is would be useful?</blockquote><div><br></div></span><div>Oh, it's just more efficient than having a densemap based cache if you can make it work :)</div><div> </div><div>It's optimally efficient space wise, but  you may pay the price in invalidaion time.</div><span><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Is the cache just invalidated too aggressively?</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="https://reviews.llvm.org/D25172" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2517<wbr>2</a><br>
<br>
<br>
<br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>