[llvm-commits] [llvm] r103802 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MBlaze/ lib/Target/MBlaze/AsmPrin

Bill Wendling isanbard at gmail.com
Fri May 14 14:33:50 PDT 2010


On May 14, 2010, at 2:26 PM, Anton Korobeynikov wrote:

>> N.B., several back-ends are using "HasCalls" as being synonymous for something
>> that adjusts the stack. This isn't 100% correct and should be looked into.
> I'm not quite sure for other backends, but systemz backend was correct.
> The semantics was precisely "has calls", the stack frame is always
> created for non-leaf functions in order to provide register save area
> for callees.
> 
> x86 (win64) semantics is definitely the same - please switch to
> hasCalls() there as well, we need to create register save area
> regardless whether there are local stack variables or not.
> 
Hi Anton,

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 test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll would fail. 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.

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.

-bw

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100514/6e05d9a0/attachment.html>


More information about the llvm-commits mailing list