<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 27, 2017 at 3:44 PM, Daniel Berlin via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">dberlin added a comment.<br>
<br>
The whole point of starting to rewrite-reassociate as n-ary reassociate was to have a better framework to handle better reassociation and placement issues.<br></blockquote><div><br></div><div>The primary goal of reassociation is not to reduce register pressure, but it has the side effect of changing overlapping live ranges due to the aggressive code motion it has.  It looks reasonable to me to slightly tame the over-zealous code motion and make it slightly register pressure aware.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Reassociate is supposed to be a simple, and dumb, reassociate.<br>
<br></blockquote><div><br></div><div>The simple analysis is done at tree level, which is quite effective is handling the problem.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Trying to integrate code placement into it seems like a ... bad plan.<br>
It's neither structured in a way that you can easily make such a thing fast, nor can you really do a good job of it.<br></blockquote><div><br></div><div>I think this simple technique can actually do a good job for a lot of cases with very little added complexity.</div><div> </div><div><br></div><div>> The longer term picture is probably something like </div><div> </div><div><a href="http://gcc.1065356.n8.nabble.com/A-new-gimple-pass-LRS-live-range-shrinking-to-reduce-register-pressure-td495858.html">http://gcc.1065356.n8.nabble.com/A-new-gimple-pass-LRS-live-range-shrinking-to-reduce-register-pressure-td495858.html</a></div><div><br></div><div>that is not something that can happen anytime soon.</div><div><br></div><div>David</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<a href="https://reviews.llvm.org/D32563" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D32563</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>