<div dir="ltr">> <span style="font-size:12.8px">I'm not sure such a flag makes sense, given the above.  I'm not sure you *want* to try to alternate between them, because a lot of your order of magnitude  speedups will come from doing things fundamentally different than random querying (IE move to more "SSA-like" algorithms).</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Then, do you know of a better way to allow people to opt-in/opt-out of using MemorySSA? Or do you not see the transition to MemorySSA causing many issues? (I'm assuming it's the latter. :) )</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">If you do the optimizations, i'm happy to start to convert passes. I was going to just do them in close to the order necessary to preserve memssa from beginning to end of opts that use it, but happy to do whatever. </span><span style="font-size:12.8px">Converting most passes requires building an update API, and converting a few of them and seeing what they want out of updating is the best way i can think of to design that API.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">WFM * 2. I'll start with the things that we ripped out, then look at MemDep to figure out what tricks it has up its sleeve. If there's anywhere else you would recommend looking?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 9:37 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"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
</span>I don't have any plans. If we want to port existing passes soon, we'll either need an update API, or we'll need to restrict ourselves to passes that don't use the update API.</blockquote></span><div><br>FWIW: For the passes i played with converting,  timing compute memssa + use it vs memdep, for basically all testcases i could find, the time difference was in the noise.</div><div>For larger cases, memssa is a straight win.</div><div>This is because most of the memdep passes are walking a ton of blocks/insts repeatedly anyway.</div><span class=""><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Also, we'll need a wrapper that either queries MemDep or MemorySSA if we want to have a global "use MemorySSA?" flag.</blockquote><div><br></div></span><div>I'm not sure such a flag makes sense, given the above.  I'm not sure you *want* to try to alternate between them, because a lot of your order of magnitude  speedups will come from doing things fundamentally different than random querying (IE move to more "SSA-like" algorithms).</div><div><br></div><div>(Though i expect using memssa as a straight replacement will still likely be faster).</div><span class=""><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If we think making a simple MemorySSA-based DSE pass would be a better first step, I'm fine doing that, as well. Same thing goes for readding the optimizations that were stripped out today.<br>
<br></blockquote><div><br></div></span><div>If you do the optimizations, i'm happy to start to convert passes. I was going to just do them in close to the order necessary to preserve memssa from beginning to end of opts that use it, but happy to do whatever.</div><div><br></div><div>(mergedloadstoremotion and memcpyoptimizer are the easiest things to convert and will give speedups).</div><div><br></div><div><br></div><div>Converting most passes requires building an update API, and converting a few of them and seeing what they want out of updating is the best way i can think of to design that API.</div><div><br></div><div>(You can see where i played with it in the mergedloadstoremotion mpass).</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So long as progress is made, I'm happy. :)<br>
<br>
<br>
<a href="http://reviews.llvm.org/D7864" rel="noreferrer" target="_blank">http://reviews.llvm.org/D7864</a><br>
<br>
<br>
<br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>