[PATCH] D109870: [AMDGPU] Enable the pass "amdgpu-replace-lds-use-with-pointer"

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 19:16:50 PDT 2021


hsmhsm updated this revision to Diff 374091.
hsmhsm added a comment.

At the moment, it is not *very clear* if LLVM IR with static alloca after call
is legal or not.

In this pass, since we need to split the entry block before any call, any static
alloca after the call will be converted into dynamic alloca which we want to avoid.

So, for now, the we skip running this pass, if there a kernel which has static
alloca after call, and we will revisit this code later once we have clear clarity
on the placement of static alloca.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109870/new/

https://reviews.llvm.org/D109870

Files:
  llvm/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-diamond-shape.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-selected_functions.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-call-to-declare-only-func.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-global-scope-use.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-inline-asm-call.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-kernel-only-used-lds.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-not-reachable-lds.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-ignore-small-lds.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-diamond-shape.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-selected_functions.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-indirect-call-signature-match.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-split-entry-bb-after-static-alloca.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-multiple-lds.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-same-lds.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-const-expr1.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-const-expr2.ll
  llvm/test/CodeGen/AMDGPU/replace-lds-by-ptr-use-within-phi-inst.ll
  llvm/test/CodeGen/replace-lds-by-ptr-ignore-static-alloca-after-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109870.374091.patch
Type: text/x-patch
Size: 19390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/bd2c90ea/attachment.bin>


More information about the llvm-commits mailing list