[SystemZ] Improve handling of backchain offset.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 12 Dec 2020 02:22:08 +0000 (03:22 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 14 Dec 2020 18:39:38 +0000 (12:39 -0600)
commit653b97690f0d5c26a93002fb94ddd86397ed6c1c
treee60415178136dca7ed8502b249dc45239f5daff0
parent5f53d28fa68142bbd9dfb2b33f955352b180d776
[SystemZ] Improve handling of backchain offset.

- New function SDValue getBackchainAddress() used by
  lowerDYNAMIC_STACKALLOC() and lowerSTACKRESTORE() to properly handle the
  backchain offset also with packed-stack.

- Make a common function getBackchainOffset() for the computation of the
  backchain offset and use in some places (NFC).

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D93171
llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
llvm/lib/Target/SystemZ/SystemZFrameLowering.h
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.h
llvm/test/CodeGen/SystemZ/backchain.ll