<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 14, 2010, at 2:26 PM, Anton Korobeynikov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite">N.B., several back-ends are using "HasCalls" as being synonymous for something<br></blockquote><blockquote type="cite">that adjusts the stack. This isn't 100% correct and should be looked into.<br></blockquote>I'm not quite sure for other backends, but systemz backend was correct.<br>The semantics was precisely "has calls", the stack frame is always<br>created for non-leaf functions in order to provide register save area<br>for callees.<br><br>x86 (win64) semantics is definitely the same - please switch to<br>hasCalls() there as well, we need to create register save area<br>regardless whether there are local stack variables or not.<br><br></div></blockquote>Hi Anton,</div><div><br></div><div>Interesting. SystemZ is an example of where, when I change it to use a "HasCalls" that's set correctly (i.e., it's set if there's any call, not just an adjustment of the stack frame), then <span class="Apple-style-span" style="font-family: monospace; ">test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll would fail. </span><span class="Apple-style-span" style="font-family: monospace; ">Also, if I do a self-hosted build on X86 with HasCalls set if there are any calls, then the resulting binary doesn't work.</span></div><div><span class="Apple-style-span" style="font-family: monospace; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; ">So there are some weird (and in my view incorrect) assumptions going on in the back ends which isn't correct. This is why I changed the name of the flag instead of making it true if there are any calls regardless of stack adjustments.</span></div><div><span class="Apple-style-span" style="font-family: monospace; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; ">-bw</span></div><div><font class="Apple-style-span" face="monospace"><br></font></div></body></html>