[PATCH] D154083: [AMDGPU] Rematerialize scalar loads

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 06:59:38 PDT 2023


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

Extend the list of instructions that can be rematerialized in
SIInstrInfo::isReallyTriviallyReMaterializable() to support scalar loads.

Try shrinking instructions to remat only the part needed for current
context. Add SIInstrInfo::reMaterialize target hook, and handle shrinking
of S_LOAD_DWORDX16_IMM to S_LOAD_DWORDX8_IMM as a proof of concept.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154083

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.h
  llvm/test/CodeGen/AMDGPU/hsa-metadata-kernel-code-props-v3.ll
  llvm/test/CodeGen/AMDGPU/hsa-metadata-kernel-code-props.ll
  llvm/test/CodeGen/AMDGPU/remat-smrd.mir
  llvm/test/CodeGen/AMDGPU/snippet-copy-bundle-regression.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154083.535774.patch
Type: text/x-patch
Size: 28210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/214d985e/attachment-0001.bin>


More information about the llvm-commits mailing list