[SystemZ] Add support for sibling calls
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 19 Aug 2013 12:42:31 +0000 (12:42 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 19 Aug 2013 12:42:31 +0000 (12:42 +0000)
commit709bda66b9ef65b36fd890bdc6aba78ec5b7553f
tree891343a7237217cfc3f1480b87daf200c30d9487
parent053704f959202ef9e349178cc434f419309f43b7
[SystemZ] Add support for sibling calls

This first cut is pretty conservative.  The final argument register (R6)
is call-saved, so we would need to make sure that the R6 argument to a
sibling call is the same as the R6 argument to the calling function,
which seems worth keeping as a separate patch.

Saying that integer truncations are free means that we no longer
use the extending instructions LGF and LLGF for spills in int-conv-09.ll
and int-conv-10.ll.  Instead we treat the registers as 64 bits wide and
truncate them to 32-bits where necessary.  I think it's unlikely we'd
use LGF and LLGF for spills in other situations for the same reason,
so I'm removing the tests rather than replacing them.  The associated
code is generic and applies to many more instructions than just
LGF and LLGF, so there is no corresponding code removal.

llvm-svn: 188669
llvm/lib/Target/SystemZ/README.txt
llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.h
llvm/lib/Target/SystemZ/SystemZInstrInfo.td
llvm/lib/Target/SystemZ/SystemZOperators.td
llvm/test/CodeGen/SystemZ/call-03.ll [new file with mode: 0644]
llvm/test/CodeGen/SystemZ/int-conv-09.ll
llvm/test/CodeGen/SystemZ/int-conv-10.ll