[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 07:49:17 PDT 2021


hsmhsm added a comment.

In D109870#3012515 <https://reviews.llvm.org/D109870#3012515>, @jdoerfert wrote:

> In D109870#3012287 <https://reviews.llvm.org/D109870#3012287>, @JonChesterfield wrote:
>
>> This is an IR transform which assumes alloca are contiguous within the entry block. Mahesha is presenting your replies to the linked thread as community approval for miscompiling code where that assumption does not hold.
>
> FWIW: LLVM-IR, in general and especially when coming from Clang, has all but VLA allocas in the entry block. That said, there is no rule in the IR that it needs to have them in the entry block. The IR is not broken.
> If you encounter IR with allocas not in the entry block it is worth to look at that and to do canonicalization. However, from the tests and patch it looks like there is a second assumption here that does not hold at all:
> Allocas do not need to be clustered in any way in the entry block.

Please note that I am talking about static allocas only here, and not dynamic allocas.


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