[PATCH] D157451: [AMDGPU] Emit .actual_access metadata
Changpeng Fang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 17:31:46 PDT 2023
cfang added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/hsa-metadata-deduce-ro-arg.ll:12
; CHECK-NEXT: AddrSpaceQual: Global
-; CHECK-NEXT: AccQual: ReadOnly
+; CHECK-NEXT: AccQual: Default
; CHECK-NEXT: IsConst: true
----------------
arsenm wrote:
> cfang wrote:
> > arsenm wrote:
> > > Seems like the mirror write only deduction test is missing
> > We currently only emit read_only for .actual_access. Do you know what are the exact
> > conditions to emit "write_only" or "read_write"? Thanks.
> >
> > if (Arg.getType()->isPointerTy() && Arg.onlyReadsMemory() &&
> > Arg.hasNoAliasAttr()) {
> > ActAccQual = "read_only";
> > }
> Arg.onlyReadsMemory and Arg.hasAttribute(Attribute::WriteOnly) (don't know if you really need the noalias part here, it's probably a runtime workaround if you do)
@rampitec: Do you remember exactly why noalias is needed?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157451/new/
https://reviews.llvm.org/D157451
More information about the llvm-commits
mailing list