[all-commits] [llvm/llvm-project] 16b7cc: [SystemZ] Eliminate call sequence instructions ear...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Thu Mar 28 10:27:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16b7cc69ef43110c9776212379ccc37d7d3263c0
      https://github.com/llvm/llvm-project/commit/16b7cc69ef43110c9776212379ccc37d7d3263c0
  Author: Jonas Paulsson <paulson1 at linux.ibm.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZFrameLowering.h
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.h
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.td
    M llvm/test/CodeGen/SystemZ/call-zos-vararg.ll
    M llvm/test/CodeGen/SystemZ/cond-move-04.mir
    M llvm/test/CodeGen/SystemZ/cond-move-08.mir
    M llvm/test/CodeGen/SystemZ/cond-move-regalloc-hints-02.mir
    M llvm/test/CodeGen/SystemZ/cond-move-regalloc-hints.mir
    M llvm/test/CodeGen/SystemZ/frame-28.mir
    M llvm/test/CodeGen/SystemZ/swifterror.ll
    M llvm/test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll

  Log Message:
  -----------
  [SystemZ] Eliminate call sequence instructions early. (#77812)

On SystemZ, the outgoing argument area which is big enough for all calls
in the function is created once during the prolog, as opposed to
adjusting the stack around each call. The call-sequence instructions are
therefore not really useful any more than to compute the maximum call
frame size, which has so far been done by PEI, but can just as well be
done at an earlier point.

This patch removes the mapping of the CallFrameSetupOpcode and
CallFrameDestroyOpcode and instead computes the MaxCallFrameSize
directly after instruction selection and then removes the ADJCALLSTACK
pseudos. This removes the confusing pseudos and also avoids the problem
of having to keep the call frame size accurate when creating new MBBs.

This fixes #76618 which exposed the need to maintain the call frame size
when splitting blocks (which was not done).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list