[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 04:02:56 PDT 2021


hsmhsm added a comment.

In D109870#3011849 <https://reviews.llvm.org/D109870#3011849>, @JonChesterfield wrote:

> Interleave alloca with calls to functions that use LDS in the entry block. You'll either fail to initialise the LDS variable before use or convert static alloca to dynamic, depending on the iteration order you choose. Iterating forwards will work for LDS and pessimise alloca. Iterating backwards will fail to initialise LDS variables before use.
>
> Edit: and at time of comment you're iterating backwards

As I clarified in my previous comments, If there exist Interleave alloca with calls to functions that use LDS in the entry block in the input ir, then input ir is already broken before coming to this pass, and this pass is also broken because it works on broken input ir. So, the pass which first broke the input should be fixed (if openmp is breaking it then openmp should fix it). You cannot ask this pass to work-around for the broken input.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109870



More information about the llvm-commits mailing list