[all-commits] [llvm/llvm-project] d45a24: [AMDGPU] Don't remove VGPR to AGPR dead spills fro...

bcahoon via All-commits all-commits at lists.llvm.org
Thu Dec 23 09:12:41 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d45a2479989985937b016a4d66ffa1ed6c885613
      https://github.com/llvm/llvm-project/commit/d45a2479989985937b016a4d66ffa1ed6c885613
  Author: Brendon Cahoon <brendon.cahoon at amd.com>
  Date:   2021-12-23 (Thu, 23 Dec 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
    A llvm/test/CodeGen/AMDGPU/same-slot-agpr-sgpr.mir

  Log Message:
  -----------
  [AMDGPU] Don't remove VGPR to AGPR dead spills from frame info

Removing dead frame indices for VGPR to AGPR spills is incorrect
when the frame index is shared by multiple objects, which may
occur due to stack slot coloring. The problem is that subsequent
code that processes the other object will assert because the stack
frame index is marked dead.

Removing dead frame indices is needed prior to stack slot
coloring, which is what happens with SGPR to VGPR spills. These
spills are lowered prior to stack slot coloring, but the VGPR
to AGPR spills are processed afterwards during the Prolog/Epilog
Inserter pass. This patch marks the VGPR to AGPR spill slot as
dead if the slot is not used by another object.

Differential Revision: https://reviews.llvm.org/D115996




More information about the All-commits mailing list