[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/125957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125957 >From 6654b86c10163d41d33cba741e8125293ade4422 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 5 Feb 2025 17:21:02 -0600 Subject: [PATCH] [Clang] Forward arguments to the device compiler better Summary:

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/125957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Joseph Huber via cfe-commits
@@ -9270,11 +9260,6 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, }); } - // If we disable the GPU C library support it needs to be forwarded to the - // link job. - if (!Args.hasFlag(options::OPT_gpulibc, options::OPT_nogpulibc, true)) ---

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Nick Sarnie via cfe-commits
@@ -9270,11 +9260,6 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, }); } - // If we disable the GPU C library support it needs to be forwarded to the - // link job. - if (!Args.hasFlag(options::OPT_gpulibc, options::OPT_nogpulibc, true)) ---

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125957 >From 4a457c531ccd3766cc14352e517b0b99ae1e6dd8 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 5 Feb 2025 17:21:02 -0600 Subject: [PATCH] [Clang] Forward arguments to the device compiler better Summary:

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I understood that `-Xarch_nvptx64` propagates `-O3` to the nvptx toolchain > but it is not obvious to me that it should pick up all the argument after it. It doesn't https://github.com/llvm/llvm-project/pull/125957 ___ cfe-commits ma

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Ye Luo via cfe-commits
ye-luo wrote: I understood that `-Xarch_nvptx64` propagates `-O3` to the nvptx toolchain but it is not obvious to me that it should pick up all the argument after it. https://github.com/llvm/llvm-project/pull/125957 ___ cfe-commits mailing list cfe-co

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > What is the rule of propagation? It is not immediately clear to me > > ``` > clang -fopenmp --offload-arch=gfx1030,sm_89 -Xarch_nvptx64 -O3 -foffload-lto > ``` > > `-foffload-lto` is an argument to `-Xarch_nvptx64` instead of `clang`. That's just an example, `-Xarch_nvptx64` w

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Ye Luo via cfe-commits
ye-luo wrote: What is the rule of propagation? It is not immediately clear to me ``` clang -fopenmp --offload-arch=gfx1030,sm_89 -Xarch_nvptx64 -O3 -foffload-lto ``` `-foffload-lto` is an argument to `-Xarch_nvptx64` instead of `clang`. https://github.com/llvm/llvm-project/pull/125957 __

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125957 >From 8d2525023e0f67a9d22d6d56faa85df3d4223b24 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 5 Feb 2025 17:21:02 -0600 Subject: [PATCH] [Clang] Forward arguments to the device compiler better Summary:

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Currently we have a subset of arguments that are handled specially to keep them consistent between host and device compiles, however, this is extremely hacky as it only works on a few predetermined op

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: Currently we have a subset of arguments that are handled specially to keep them consistent between host and device compiles, however, this is extremely hacky

[clang] [Clang] Forward arguments to the device compiler better (PR #125957)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125957 Summary: Currently we have a subset of arguments that are handled specially to keep them consistent between host and device compiles, however, this is extremely hacky as it only works on a few predetermined optio