<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 1, 2018 at 5:52 PM, Jonas Paulsson <span dir="ltr"><<a href="mailto:paulsson@linux.vnet.ibm.com" target="_blank">paulsson@linux.vnet.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I find the comment in TargetFrameLoweringImpl.cpp slightly confusing.<br>
<br>
My interpretation here is that generally IPRA reduces save/restore in callee whenever it can, and instead does this in caller. "Callee saved registers" is however also a set of specific registers, which makes me think of concerns about the allocation order.<br></blockquote><div>CC++ register allocation gurus. </div><div>Just to clarify, I think expect noCSR opt IPRA does not try to influence allocation order, but in case of noCSR opt it is expected that caller function uses register that are caller saved as much as possible so that it don't have spill/restore</div><div>around call site. If register allocation is not able to do that then we are just shifting spill/restore to around the call site.</div><div>So I think that comment is correct in context of IPRA+noCSROpt.</div><div>-Vivek</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Am I understanding things correctly, and if so does this comment change look good?<br>
<br>
-  // When interprocedural register allocation is enabled caller saved registers<br>
-  // are preferred over callee saved registers.<br>
+  // When interprocedural register allocation is enabled it is preferred<br>
+  // to save/restore registers in caller instead of callee.<br>
   if (MF.getTarget().Options.Enable<wbr>IPRA && isSafeForNoCSROpt(MF.getFuncti<wbr>on()))<br>
     return;<br>
<br>
/Jonas<br>
<br>
<br>
</blockquote></div><br></div></div>