[PATCH] D144033: [AMDGPU][MC][GFX11] Add partial NSA format for image sample instructions

Mirko Brkusanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 08:16:44 PST 2023


mbrkusanin added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:1948
+  const GCNSubtarget &ST = static_cast<const GCNSubtarget &>(STI);
+  return ST.getNSAMaxSize();
+}
----------------
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?


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

https://reviews.llvm.org/D144033



More information about the llvm-commits mailing list