[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 13:33:36 PDT 2024
AlexVlx wrote:
> > > How much of this is actually different from the existing target info for AMDGCN? Seems like we're doing a lot of redundant stuff like defining macros or features.
> >
> >
> > That's part of the point, it's not actually supposed to differ in those particular regards, up to the point where things fork into specific GFXIPs. At the same time, there's no feasible way to re-use any of that, at least not one that I can see with how targets currently work. If you're suggesting that this should actually be based on AMDGPUTargetInfo, that's probably not the right way to go since that sets additional things that do not work with SPIRV at all.
>
> Yeah, I was unsure how much of this is a subset. We could pull the common stuff into some new base class that both targets then inherit from, but it depends how much code we actually save with that method. I think I agree at the very least we should try to avoid duplicating the register list.
That's not a bad idea but I *suspect* we'll run into a physical design issue since there doesn't seem to be a natural place to put the shared base - unless you were thinking about a place in particular? We'd probably have to relocate this to the AMDGCN side, and then duplicate the SPIRV bits/details, and at that point we could just re-use/share the reg defs.
https://github.com/llvm/llvm-project/pull/89796
More information about the cfe-commits
mailing list