[PATCH] D144033: [AMDGPU][MC][GFX11] Add partial NSA format for image sample instructions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 08:21:10 PST 2023
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:1948
+ const GCNSubtarget &ST = static_cast<const GCNSubtarget &>(STI);
+ return ST.getNSAMaxSize();
+}
----------------
mbrkusanin wrote:
> foad wrote:
> > foad wrote:
> > > arsenm wrote:
> > > > foad wrote:
> > > > > I'm not sure if it's allowed to call into GCNSubtarget from this code - does anyone else know?
> > > > No, GCNSubtarget is from codegen.
> > > I guess it happens to work if you something defined in `GCNSubtarget.h`. But really I don't think we should be including `GCNSubtarget.h` here in the first place.
> > D144564
> Should I duplicate the code from getNSAMaxSize() here or have GCNSubtarget.h call AMDGPUBaseInfo version?
Have GCNSubtarget.h call AMDGPUBaseInfo version. You will have to use IsaVersion for the generation checks. There are lots of examples in AMDGPUBaseInfo.cpp.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144033/new/
https://reviews.llvm.org/D144033
More information about the llvm-commits
mailing list