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

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 11:27:57 PDT 2021


hliao added a comment.

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`.


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