[PATCH] D108971: [AMDGPU] Split entry basic block after alloca instructions.

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 02:05:24 PDT 2021


hsmhsm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReplaceLDSUseWithPointer.cpp:196
+    //
+    // Find the split point just after alloca.
+    auto &EBB = K->getEntryBlock();
----------------
foad wrote:
> Wouldn't this break if the entry block contains something that needs the lds pointer initialized, followed by an alloca?
Only such possibility for breaking is - there is a call to non-kernel function foo() before alloca, and foo() uses LDS. But, the assumption here is that usually won't happen, because allocas are usually put at the beggining of the entry block.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108971



More information about the llvm-commits mailing list