[clang] [NVPTX] Allow compiling LLVM-IR without `-march` set (PR #79873)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 06:07:03 PST 2024


jhuber6 wrote:

> > Right now if you specify target-cpu you get target-cpu attributes, which is what we don't want.
> 
> I'm fine handling 'generic' in a special way under the hood and not specifying target-CPU.
> 
> My concern is about user-facing interface. Command line options must be overridable. For the CPU I would be able to specify the variant that matches the default. For GPU I'll have no way to explicitly pick 'generic' as the target. I think this is important.

I can add `generic` for overloading purposes, but I'd prefer if leaving it off implied generic as well, at least for this standalone target version. This is a little divergent from standard CPU targets because GPUs have no backward compatibility, so something being "generic" requires a bit more work.

https://github.com/llvm/llvm-project/pull/79873


More information about the cfe-commits mailing list