<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We did something like this back when the register allocator couldn't split live ranges.<br>
</blockquote><div><br>Yes, I remember the isWinToJoinCrossClass() function, removed here:<br><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?r1=152016&r2=155551&diff_format=h">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?r1=152016&r2=155551&diff_format=h</a><br>
that prevented some coalescing to the cost of leaving many unnecessary copies around for very constrained regclasses like the one I have.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The problem is that any heuristic you can come up with only makes the problem less likely to happen. It doesn't actually fix it.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br>Indeed, that heuristic I wrote is a nasty hack and not the way of fixing it correctly. Now that the regalloc has much more freedom on making changes in the code I hope it is fixable. If you need any other info apart of the dumps I've already attached please ask.<br>
<br>Thanks!<br></div></div><br>