[PATCH] D124472: [AMDGPU] Properly mark MUBUF and FLAT LDS DMA instructions. NFC.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 02:12:53 PDT 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/BUFInstructions.td:518
+  let VALU = isLds;
+  let hasSideEffects = isLds;
 }
----------------
foad wrote:
> arsenm wrote:
> > rampitec wrote:
> > > arsenm wrote:
> > > > Loads and stores shouldn't be marked hasSideEffects, only mayLoad/mayStore
> > > How do you suggest to mark that it can read and write virtually any memory?
> > > Note that atomics have hasSideEffects flag.
> > They shouldn't have it set either. mayLoad or mayStore indicate this. the MMO may just not have meaningful pointer info
> So these pseudos should either have 0 MMOs (no info, conservatively correct) or 2 MMOs (one for the BUF access and one for the LDS). Having just 1 MMO would be wrong.
They should have 2 (I have no idea how to to distinguish load and store for a DMA). But the reality is I cannot express this operation in terms of pointers  and ranges. This is scatter on the load side and gather on the store side. Or vice versa for the opposite operation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124472



More information about the llvm-commits mailing list