[PATCH] D112466: [NVPTX] Drop memory references of LDG/LDU

Andrew Savonichev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 13:07:21 PDT 2021


asavonic added a comment.

In D112466#3106921 <https://reviews.llvm.org/D112466#3106921>, @hliao wrote:

> In D112466#3106496 <https://reviews.llvm.org/D112466#3106496>, @asavonic wrote:
>
>> In D112466#3106139 <https://reviews.llvm.org/D112466#3106139>, @hliao wrote:
>>
>>> These machine instruction should be marked with `mayLoad` as they are really load instructions. Check the attached patch fixing the machine verifier.
>>> F20053099: 0001-nvptx-Mark-LDG-LDU-mayLoad.patch <https://reviews.llvm.org/F20053099>
>>
>> This is where we started from in this review request (see the revision 382033).
>> I think the consensus is that LDU is not a load, because it operates on read-only memory (and therefore can be safely excluded from memory-related analysis).
>> I'm not sure about LDG though.
>
> Memory analysis already knows any loads from constant memory won't inference with other loads or stores (pointsToConstantMemory). Loads from constant memory are still a load. They needs to be marked with `mayLoad`.

It seems that pointsToConstantMemory is not implemented for NVPTX, so we'll have fix that.
@jlebar, does this sound like a better solution?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112466



More information about the llvm-commits mailing list