[clang] [llvm] Make OpenCL an OSType rather than an EnvironmentType. (PR #170297)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 06:34:47 PST 2026
jmmartinez wrote:
> > I'm also wondering how this could eventually compose with other targets. For example, if I'm compiling for amd, we could use amdgcn-amd-opencl instead of --amdhsa? and would that enable some simplification somewhere? Are other targets communicating some OpenCL specific information in the IR through other means, like metadata, attributes... that we could replace?
>
> You could use `amdgcn-amd-opencl`, but I don't think it would replace `--amdhsa` at the moment. I don't really know, but that wasn't the intent of this PR, and I guess it would require some more work elsewhere. Like I said before, the main driver for this PR was to align `OpenCL` with `Vulkan`, and facilitate how `SPIRVSubtarget` chooses the environment.
Ah sure, we shouldn't do that. At least not now. It was hypothetical, just to think if there could be an obvious mismatch.
https://github.com/llvm/llvm-project/pull/170297
More information about the llvm-commits
mailing list