[PATCH] D92483: AMDGPU - Use MUBUF instructions for global address space access

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 11:37:02 PST 2020


scott.linder added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:93
   if (isAmdHsaOS()) // Turn on FlatForGlobal for HSA.
     FullFS += "+flat-for-global,+unaligned-access-mode,+trap-handler,";
 
----------------
pvellien wrote:
> t-tye wrote:
> > pvellien wrote:
> > > t-tye wrote:
> > > > Seems +flat-for-global should not be added if SI. Suggest pulling up later logic to here and combine.
> > > But the gen member variable is set to correct generation only after the call to parsesubtargetfeatures function, so it would be incorrect to use getGeneration function in this place.  I think it would be better to conditionally select later.
> > But could that earlier code be using some other means to determine if the target supports flat operations? Is there no target property for that?
> > 
> > If not then leaving "as is" is fine with me. Just would be nice if the logic for each aspect was logically organized together rather than spread over different places making it hard to figure out what is happening.
> As far as I know there is no target property for that. I  agree that it would be very much clear to have a common place for this mechanism
There is `FeatureFlatAddressSpace`, but it will also only be set as part of `ParseSubtargetFeatures`.

I'm not sure why this needs to be here, unless some parts of `ParseSubtargetFeatures` depend on these features being set or not? Otherwise this could all be done below in one place.


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

https://reviews.llvm.org/D92483



More information about the llvm-commits mailing list