[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 23 14:03:25 PDT 2022
tra added a comment.
In D126226#3532257 <https://reviews.llvm.org/D126226#3532257>, @MaskRay wrote:
> It's better to avoid `JoinedAndSeparate` for new options. It is for `--xxx val` and `--xxxval` but not intended for the option this patch will add.
I'm not sure I understand your argument. The two cases where I see `JoinedAndSeparate` are used right now (`-Xarch_` and `-plugin-arg`) both are using it for the purposes similar to this patch.
I also do not quite see how `JoinedAndSeparate` is applicable to `--xxxval`/`--xxx val`.
Could you elaborate, please?
In D126226#3532301 <https://reviews.llvm.org/D126226#3532301>, @MaskRay wrote:
> Consider something like `-Xoffload-linker-triple <triple>=<arg>`
That could work.
We keep running into the same old underlying issue that we do not have a good way to name/reference specific parts of the compilation pipeline. -Xfoo used to work OK for the linear 'standard' compilation pipeline, but these days when compilation grew from a simple linear pipe it's no longer adequate and we need to extend it.
Speaking of triples. I think using triple as the selector is insufficient for general offloading use. We may have offload variants that would use the same triple, but would be compiled using their own pipeline. E.g. the GPU binaries for sm_60 and sm_80 GPUs will use the same nvptx64 triple, but would presumably be lined with different linker instances and may need different options. My understanding is that AMDGPU has even more detailed offload variants (same triple, same GPU arch, different features). I don't know whether it's applicable to OpenMP, though. I think it is. IIRC OpenMP has a way to specialize offload to particular GPU variant and that would probably give you multiple offload targets, all with the same triple.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126226/new/
https://reviews.llvm.org/D126226
More information about the cfe-commits
mailing list