<div dir="ltr">Davide, as Danny noticed, I think the main troublesome patch is r272595.   There is no need to eliminate that class and statiize all the methods. Instead, what is needed is to move legacy pass specific members out of class MergedLoadStoreMotion and keep the original class as the 'transformation class' that can be shared.<div><br></div><div>Can you revert that change and do the above suggested refactoring -- that will only take a few lines, I think.</div><div><br></div><div>thanks,</div><div><br></div><div>David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 16, 2016 at 1:49 PM, Davide Italiano 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"><span class="">On Thu, Jun 16, 2016 at 9:48 AM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
> Hey guys:<br>
><br>
> I'm a little concerned how some of these passes are being converted.<br>
><br>
> For example, mergedloadstoremotion was entirely turned into a bunch of<br>
> static helpers that pass around lots of what was previously simple class<br>
> state.<br>
><br>
> With no review, or discussion.<br>
><br>
> I find it *much* harder to understand, and in fact, with the memoryssa<br>
> version coming, it would mean tons of functions now get passed 4 or 5 random<br>
> things like AA, DT, MD, MSSA, etc.<br>
><br>
> This doesn't make a lot of sense, and it could have been easily avoided<br>
> entirely. The simplest refactoring would have been to modify the existing<br>
> class a bit so it looks closer to the classes we use for utils, pass the<br>
> right pieces in the constructor, and leave the rest alone.<br>
><br>
> In fact, i've asked for that particular set of patches to be reverted.<br>
><br>
> I'm not opposed to simply committing them when they convert one thing to a<br>
> static helper or whatever.<br>
> But i think if what is happening is wholesale conversion of classes to<br>
> statics, etc, either it needs review, or we shouldn't be doing it that way.<br>
><br>
> Because, IMHO, in at least that case, it ended up *much* worse than the<br>
> original pass.<br>
><br>
<br>
</span>I missed this thread (only saw the comment on the original patch).<br>
The pass was reverted. Again, I recommend you to take a look at the<br>
existing passes ported (at least by me) and let me know if there's<br>
something you don't like or whatever so that I can try to fix/revert.<br>
<br>
--<br>
Davide<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>