[PATCH] D112852: [GlobalISel] Allow DBG_VALUE to use invalid vregs throughout pipeline

Jack Andersen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 15:53:39 PDT 2021


jackoalan created this revision.
jackoalan added reviewers: aemerson, arsenm, jmorse, MatzeB.
Herald added subscribers: asavonic, foad, kerbowa, pengfei, hiraditya, rovka, nhaehnle, jvesely, jholewinski.
jackoalan requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Expanding on D109750 <https://reviews.llvm.org/D109750>.

Since `DBG_VALUE` instructions have final register validity determined in `LDVImpl::handleDebugValue`, there is no apparent reason to immediately prune unused register operands as their defs are erased. Consequently, this renders `MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval` moot.

The only necessary changes involve making relevant passes consider invalid DBG_VALUE vregs uses as valid.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112852

Files:
  llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  llvm/include/llvm/CodeGen/MachineInstr.h
  llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
  llvm/lib/CodeGen/GlobalISel/Combiner.cpp
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
  llvm/lib/CodeGen/GlobalISel/Utils.cpp
  llvm/lib/CodeGen/MachineCombiner.cpp
  llvm/lib/CodeGen/MachineInstr.cpp
  llvm/lib/CodeGen/MachineVerifier.cpp
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/select-dbg-value.mir
  llvm/test/CodeGen/AMDGPU/fold-readlane.mir
  llvm/test/CodeGen/X86/GlobalISel/x86-calllowering-dbg-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112852.383517.patch
Type: text/x-patch
Size: 17156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/b598e6cf/attachment.bin>


More information about the llvm-commits mailing list