[PATCH] D117562: [AMDGPU] Sink immediate VGPR defs if high RP

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 06:37:46 PST 2022


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

MachineLICM hoists any immediate defs because they are deemed trivially rematerializable without checking for RP in hopes that RA will pull them down again if needed. However this does not take occupancy into account and RA will not pull these defs down to increase occupancy even if hoisting them decreased occupancy in the first place. Thus this patch tries to manually sink simple imm defs, has one def and has one use, in the preheader back into loops if occupancy is too low in attempts of lowering RP and increasing occupancy.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117562

Files:
  llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
  llvm/test/CodeGen/AMDGPU/pre-ra-opt-sink-imm.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117562.400829.patch
Type: text/x-patch
Size: 188400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/a988f7d4/attachment-0001.bin>


More information about the llvm-commits mailing list