[PATCH] D157451: [AMDGPU] Emit .actual_access metadata

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 15:39:23 PDT 2023


arsenm 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
----------------
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)


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

https://reviews.llvm.org/D157451



More information about the llvm-commits mailing list