[PATCH] D63682: AMDGPU: Fold frame index into MUBUF

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 17:08:00 PDT 2019


arsenm created this revision.
arsenm added a reviewer: rampitec.
Herald added subscribers: arphaman, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.

This matters for byval uses outside of the entry block, which appear
as copies.

      

Previously, the only folding done was during selection, which could
not see the underlying frame index. For any uses outside the entry
block, the frame index was materialized in the entry block relative to
he global scratch wave offset.

      

This may produce worse code in cases where the offset ends up not
fitting in the MUBUF offset field. A better heuristic would be helpfu
for extreme frames.


https://reviews.llvm.org/D63682

Files:
  lib/Target/AMDGPU/SIFoldOperands.cpp
  lib/Target/AMDGPU/SIInstrInfo.h
  test/CodeGen/AMDGPU/byval-frame-setup.ll
  test/CodeGen/AMDGPU/fold-fi-mubuf.mir
  test/CodeGen/AMDGPU/frame-index-elimination.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.readfirstlane.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63682.206101.patch
Type: text/x-patch
Size: 16840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190622/c219ca8c/attachment.bin>


More information about the llvm-commits mailing list