<div dir="ltr">LGTM. Please go ahead and commit. Thanks Arnaud!<div><br></div><div>- Lang.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 22, 2014 at 6:38 AM, Arnaud A. de Grandmaison <span dir="ltr"><<a href="mailto:arnaud.degrandmaison@arm.com" target="_blank">arnaud.degrandmaison@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal">Hi Lang,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Could you please review this second patch in the PBQP improvement series ?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This patch teaches PBQP to handle callee saved registers: registers are not all equal.<u></u><u></u></p><p class="MsoNormal">Some are not allocatable (infinite cost), some have to be preserved but can be used,<u></u><u></u></p><p class="MsoNormal">and some others are just free to use.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Ensure there is a cost hierarchy reflecting this, so that the allocator will favour scratch<u></u><u></u></p><p class="MsoNormal">registers over callee-saved registers. This does not model fully the reality as the cost<u></u><u></u></p><p class="MsoNormal">for saving / restoring those CSR is paid only once, at their very first use, and they then<u></u><u></u></p><p class="MsoNormal">become equivalent to scratch registers: with this patch, they will always have a higher cost.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">One way to improve this would be to handle that on a per allocation round basis: if a CSR has<u></u><u></u></p><p class="MsoNormal">been used in one of the preceding rounds, then it becomes a scratch reg in the sense that<u></u><u></u></p><p class="MsoNormal">it is as cheap to use as a scratch reg. This would be closer to reality. What do you think ?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Cheers,<u></u><u></u></p><p class="MsoNormal"><span>--<u></u><u></u></span></p><p class="MsoNormal"><span>Arnaud A. de Grandmaison<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div></div></blockquote></div><br></div>