[PATCH] D150390: [AMDGPU] Introduce and use the new PRED_COPY opcode

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 11:34:20 PDT 2023


yassingh created this revision.
Herald added subscribers: foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm, qcolombet, MatzeB.
Herald added a project: All.
yassingh requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Since all active lanes data should be preserved while splitting vector registers
that might contain SGPR spills we introduce new opcode to be used instead of 
TargetOpcode::COPY.

Define a new predicated copy opcode (PRED_COPY) to be used in LiveRangeSplitting.
Later instead of lowering it to corresponding MachineInstrction it will be lowered to COPY 
Instruction after the necessary WWM code is inserted around it in SISimplifyPredicatedCopyPass.
This will prevent duplication of lowerCopy() code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150390

Files:
  llvm/lib/Target/AMDGPU/AMDGPU.h
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/lib/Target/AMDGPU/CMakeLists.txt
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.h
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/lib/Target/AMDGPU/SISimplifyPredicatedCopies.cpp
  llvm/test/CodeGen/AMDGPU/greedy-global-heuristic.mir
  llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
  llvm/test/CodeGen/AMDGPU/partial-regcopy-and-spill-missed-at-regalloc.ll
  llvm/test/CodeGen/AMDGPU/regalloc-fail-unsatisfiable-overlapping-tuple-hints.mir
  llvm/test/CodeGen/AMDGPU/sgpr-regalloc-flags.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150390.521390.patch
Type: text/x-patch
Size: 24290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230511/f8bfae15/attachment.bin>


More information about the llvm-commits mailing list