[PATCH] D135071: [AMDGPU] Implement TargetTransformInfo canAlwaysSinkRead

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 04:06:13 PDT 2022


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

Allow sinking of invariant loads across critical edges during Sink
pass when amdgpu-aggressive-load-sinking attribute is set to true.
This should always be safe.
Typically it reduces VGPR pressure, but can increase SGPR pressure.

If amdgpu-always-sink-loads is *also* set true then allow sinking
of all loads.
The intention is that the frontend sets this after validating the
shader has no memory writes and no EXEC manipulation (e.g. kills).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135071

Files:
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
  llvm/lib/Target/AMDGPU/MIMGInstructions.td
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  llvm/test/CodeGen/AMDGPU/aggressive-load-sinking.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135071.464651.patch
Type: text/x-patch
Size: 15184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221003/bda25959/attachment.bin>


More information about the llvm-commits mailing list