<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
> Maybe?<br>
><br>
> Remember that this reassociate has *zero* global view of expressions.<br>
> It only makes locally good choices.<br>
><br>
> IE given:<br>
>      bar(a + b);<br>
>      bar((a + 2) + b);<br>
><br>
><br>
> This reassociate will process the a + b and a + 2 + b separately,<br>
<br>
</div></div>This patch will not change the original handling of this case because<br>
both a and b has >1 uses.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br>Sure, i was just pointing out it is only handling local tree-level stuff, and the way it forms trees will not necessarily guarantee that the overall live range of the values is reduced (precisely because the trees it forms do not contain all uses).</div><div><br></div><div>IE it is guaranteed to try to shrink a live range locally, and either succeed or do nothing.</div><div>That may or may not shrink a live range globally, and may increase the live range locally.</div><div><br></div><div><br></div><div>IE</div><div>       A</div><div>        | </div><div>A     |</div><div>|       | </div><div>|       | </div><div>A      A</div><div>       </div><div>A<br>|</div><div>|</div><div>A   </div><div><br></div><div>-></div><div><br></div><div>A<br>|</div><div>|<br>A   A</div><div>      |</div><div>      |</div><div>A   A</div><div>|</div><div>|<br>A</div><div><br></div><div><br></div><div>This has shrunk the live range of A locally, but made it worse globally.</div><div><br></div><div><br></div><div><br></div></div></div></div>