[PATCH] D98038: [AMDGPU] Fix the dead frame indices during custom spill lowering.

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 05:47:11 PST 2021


cdevadas created this revision.
cdevadas added reviewers: arsenm, scott.linder.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, qcolombet.
cdevadas requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

AMDGPU target tries to handle the SGPR and VGPR spills in a
custom pass before the actual frame lowering pass. Once they
are handled and the respective frames are eliminated in the
custom pass, certain uses of them still remain. For instance,
the DBG_VALUE instructions inserted by the allocator alongside
the spill instruction will use the corresponding frame index.
They become dead later during PEI and causes a crash while trying to
replace the frame indices. We should possibly avoid this custom pass.
For now, replacing such dead references with null register value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98038

Files:
  llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
  llvm/test/CodeGen/AMDGPU/sgpr-spill-dead-frame-in-dbg-value.mir
  llvm/test/CodeGen/AMDGPU/vgpr-spill-dead-frame-in-dbg-value.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98038.328487.patch
Type: text/x-patch
Size: 7351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210305/c4491b35/attachment.bin>


More information about the llvm-commits mailing list