https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/100607
>From 0cc36f8aa42c1b673b1d239bf1518990582c5479 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 25 Jul 2024 12:31:09 -0500
Subject: [PATCH] [NVPTX] Correctly forward the PTX feature to the nvlink
wrapper
jhuber6 wrote:
> The patch seems to change only the test file. Should there be more changes in
> the patch?
I think I somehow accidentally merged it with another patch and then lost it
when I made a new branch..
https://github.com/llvm/llvm-project/pull/100607
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/99315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/100652
Summary:
The `nvlink-wrapper` can do LTO now, which means we can still create
some LLVM-IR without needing an architecture. In the case that we try to
invoke `nvlink` internally, that will still fail. This patch
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/100424
>From da623e1f8259a42aee469dc99f05e8cd24caf511 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 24 Jul 2024 11:44:22 -0500
Subject: [PATCH 1/2] [LinkerWrapper] Forward `-mllvm` and `--offload-opt`
argumen
Author: Joseph Huber
Date: 2024-07-26T09:51:25-05:00
New Revision: e603df083be3d41680c6289bce549b022dcfe7d5
URL:
https://github.com/llvm/llvm-project/commit/e603df083be3d41680c6289bce549b022dcfe7d5
DIFF:
https://github.com/llvm/llvm-project/commit/e603df083be3d41680c6289bce549b022dcfe7d5.diff
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/100760
Summary:
We can use `-r` and `--lto-emit-llvm` to get the LTO pass to optimize +
link LLVM-IR. Currently this doesn't work on AMDGPU because it always
passes `-shared` which is incompatible with `-r`. Fix that so
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/100760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> Do we have the varargs handling pass run even with O0?
Yes, it's a mandatory pass for NVPTX and AMDGPU. I added an extra pass in LTO
recently just to let vararg functions be inlined, it's not necessary for
correctness.
https://github.com/llvm/llvm-project/pull/98940
_
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/98940
>From 9195ed11dde78e04c831a5bcb6f9c1cc0e6f0304 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 15 Jul 2024 12:42:09 -0500
Subject: [PATCH] [OpenMP][libc] Remove special handling for OpenMP printf
Summary:
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/98940
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Joseph Huber
Date: 2024-07-26T16:39:12-05:00
New Revision: fea5914c926e2f013a8b5e27eaa74c7047fb2c71
URL:
https://github.com/llvm/llvm-project/commit/fea5914c926e2f013a8b5e27eaa74c7047fb2c71
DIFF:
https://github.com/llvm/llvm-project/commit/fea5914c926e2f013a8b5e27eaa74c7047fb2c71.diff
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/100652
>From 5017fe0cc33af9b7731786122c21602258b51c9a Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Thu, 25 Jul 2024 15:40:40 -0500
Subject: [PATCH 1/2] [Clang] Suppress missing architecture error when doing
LTO
Author: Joseph Huber
Date: 2024-07-26T17:21:56-05:00
New Revision: dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc
URL:
https://github.com/llvm/llvm-project/commit/dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc
DIFF:
https://github.com/llvm/llvm-project/commit/dbb8b7a0f4eea1aa333cec9a38aa6eb7ecf6c1dc.diff
jhuber6 wrote:
What are we relying on `-mlink-builtin-bitcode` for right now? IIUC it's mostly
just math, right?
https://github.com/llvm/llvm-project/pull/96742
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH 1/3] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directl
@@ -29,6 +29,9 @@
// RUN: -fuse-ld=ld %s 2>&1 | FileCheck -check-prefixes=LD %s
// LD: ld.lld
+// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 %s 2>&1 |
FileCheck -check-prefix=ROCM %s
+// ROCM-NOT: -mlink-builtin-bitcode
+
// RUN: %clang -### --target=amdgcn-a
@@ -29,6 +29,9 @@
// RUN: -fuse-ld=ld %s 2>&1 | FileCheck -check-prefixes=LD %s
// LD: ld.lld
+// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 %s 2>&1 |
FileCheck -check-prefix=ROCM %s
+// ROCM-NOT: -mlink-builtin-bitcode
+
// RUN: %clang -### --target=amdgcn-a
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH 1/4] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directl
https://github.com/jhuber6 commented:
`lld` changes need to be separate, forwarding `-mllvm` is
https://github.com/llvm/llvm-project/pull/100424 but I forgot to merge it so
I'll do that.
https://github.com/llvm/llvm-project/pull/101008
___
cfe-commit
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/100424
>From 88b8b4fc649dd9c900fc941f1e03cd5fc097acc1 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Wed, 24 Jul 2024 11:44:22 -0500
Subject: [PATCH] [LinkerWrapper] Forward `-mllvm` and `--offload-opt`
arguments t
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/100424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/101008
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/101032
Summary:
`-Xlinker` is supposed to pass options to the linker, while
`-Xoffload-linker` instead passes it to the `clang` job. This is
unintuitive and results in unnecessarily complex command lines. Because
passin
@@ -1236,6 +1238,23 @@ DerivedArgList getLinkerArgs(ArrayRef Input,
Args.MakeArgString(Value));
}
+ // Forward '-Xoffload-compiler' options to the appropriate backend.
+ for (StringRef Arg : Args.getAllArgValues(OPT_device_compiler_args_EQ)) {
+a
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/101032
>From 19d0d5622fbc5b7df07e2fc907b8e7c50216bcde Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 29 Jul 2024 10:36:12 -0500
Subject: [PATCH] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker`
semanti
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/101037
Summary:
The `ld.lld` linker handles LTO, but it does not understand the
target-id syntax some AMDGPU targets use. This patch parses the
target-id and passes the processor name in `-mcpu` and features in
`-mattr`
@@ -634,7 +634,17 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
C.getDriver().getLTOMode() == LTOK_Thin);
else if (Args.hasArg(options::OPT_mcpu_EQ))
CmdArgs.push_back(Args.MakeArgString(
-"-plugin-opt=mcpu=" + Args.g
@@ -634,7 +634,17 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
C.getDriver().getLTOMode() == LTOK_Thin);
else if (Args.hasArg(options::OPT_mcpu_EQ))
CmdArgs.push_back(Args.MakeArgString(
-"-plugin-opt=mcpu=" + Args.g
@@ -634,7 +634,17 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
C.getDriver().getLTOMode() == LTOK_Thin);
else if (Args.hasArg(options::OPT_mcpu_EQ))
CmdArgs.push_back(Args.MakeArgString(
-"-plugin-opt=mcpu=" + Args.g
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/101037
>From 3ff8ea9a35e8949e53e4947d6fa0688e6d5b3939 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 29 Jul 2024 11:29:45 -0500
Subject: [PATCH] [AMDGPU] Correctly pass the target-id to `ld.lld`
Summary:
The `
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/101037
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/101032
>From 19d0d5622fbc5b7df07e2fc907b8e7c50216bcde Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 29 Jul 2024 10:36:12 -0500
Subject: [PATCH 1/2] [LinkerWrapper] Make `-Xoffload-linker` match `-Xlinker`
sem
jhuber6 wrote:
> Do we have some sort of documentation where this change of behavior needs to
> be communicated?
Could probably specify it more in the docs.
https://github.com/llvm/llvm-project/pull/101032
___
cfe-commits mailing list
cfe-commits@lis
@@ -781,6 +791,8 @@ bool isValidCIdentifier(StringRef S) {
Error linkBitcodeFiles(SmallVectorImpl &InputFiles,
SmallVectorImpl &OutputFiles,
const ArgList &Args) {
+ if (Verbose)
+llvm::errs() << "Linking bitcode files\n";
@@ -581,8 +581,16 @@ Expected clang(ArrayRef InputFiles,
const ArgList &Args) {
if (SaveTemps)
CmdArgs.push_back("-save-temps");
- if (SaveTemps && linkerSupportsLTO(Args))
-CmdArgs.push_back("-Wl,--save-temps");
+ if (linkerSupportsLTO(Args)) {
+if (SaveTemps
@@ -581,8 +581,16 @@ Expected clang(ArrayRef InputFiles,
const ArgList &Args) {
if (SaveTemps)
CmdArgs.push_back("-save-temps");
- if (SaveTemps && linkerSupportsLTO(Args))
-CmdArgs.push_back("-Wl,--save-temps");
+ if (linkerSupportsLTO(Args)) {
+if (SaveTemps
jhuber6 wrote:
Ping, would like to remove the hacky code from `libc`.
https://github.com/llvm/llvm-project/pull/100652
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
Ping
https://github.com/llvm/llvm-project/pull/96561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,64 @@
+
+Clang nvlink Wrapper
+
+
+.. contents::
+ :local:
+
+.. _clang-nvlink-wrapper:
+
+Introduction
+
+
+This tools works as a wrapper around the NVIDIA ``nvlink`` linker. The purpose
+of this wrapper is to prov
@@ -0,0 +1,64 @@
+
+Clang nvlink Wrapper
+
+
+.. contents::
+ :local:
+
+.. _clang-nvlink-wrapper:
+
+Introduction
+
+
+This tools works as a wrapper around the NVIDIA ``nvlink`` linker. The purpose
+of this wrapper is to prov
@@ -0,0 +1,776 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,776 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,776 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
jhuber6 wrote:
> First batch of comments on the patch -- I only got till about the middle of
> ClangNVLinkWrapper.cpp. Will continue reviewing tomorrow.
Appreciate it. Sorry about dropping a huge patch like this on you.
https://github.com/llvm/llvm-project/pull/96561
__
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/99002
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jhuber6 commented:
I was just about to do something similar, so I'm glad you got to it before me.
I think we'll need a CMake check on whether or not `libc` was enabled as a
runtime if this option is enabled in `libcxx`, but beyond that it looks very
reasonable. All we're doi
https://github.com/jhuber6 approved this pull request.
I tested this locally and it worked quite well thanks.
My nit is that we should add a check that mirrors the already existing
`LIBCXXABI_USE_LLVM_UNWINDER` flag, which prints an error if `libunwind` isn't
in the runtimes list. After that L
https://github.com/jhuber6 approved this pull request.
https://github.com/llvm/llvm-project/pull/99325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -293,6 +293,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc++ with support for
threads." ON)
option(LIBCXX_ENABLE_MONOTONIC_CLOCK
"Build libc++ with support for a monotonic clock.
This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
+option(LIBCXX_USE_
@@ -293,6 +293,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc++ with support for
threads." ON)
option(LIBCXX_ENABLE_MONOTONIC_CLOCK
"Build libc++ with support for a monotonic clock.
This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
+option(LIBCXX_USE_
@@ -293,6 +293,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc++ with support for
threads." ON)
option(LIBCXX_ENABLE_MONOTONIC_CLOCK
"Build libc++ with support for a monotonic clock.
This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
+option(LIBCXX_USE_
@@ -293,6 +293,7 @@ option(LIBCXX_ENABLE_THREADS "Build libc++ with support for
threads." ON)
option(LIBCXX_ENABLE_MONOTONIC_CLOCK
"Build libc++ with support for a monotonic clock.
This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
+option(LIBCXX_USE_
jhuber6 wrote:
> Do we have tests that cover these cases?
There's already `printf` related tests AFAIK, this just changes the
implementation. I could add more if needed.
https://github.com/llvm/llvm-project/pull/98940
___
cfe-commits mailing list
cfe
jhuber6 wrote:
The CI seems to fail because it's not building the tool yet, the patch should
enable that dependency but maybe the bot doesn't know how to pick it up until
it lands.
https://github.com/llvm/llvm-project/pull/96561
___
cfe-commits maili
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/99687
Summary:
The `getToolChain` pass uses the triple to determine which toolchain to
create. Currently the `amdgcn-amd-amdhsa` triple maps to the
`ROCmToolChain` which uses things expected to be provided by `ROCm`.
Th
jhuber6 wrote:
> Needs test. I also would assume you shouldn't have to reinvent language
> detection code
There's an existing function for getting the inputs, but it takes the
`ToolChain` as input so it makes a circular dependency. The implementation
doesn't seem to need _that_ much from the
jhuber6 wrote:
Also, apparently there's some driver tests that expect
`--target=amdgcn-amd-amdhsa-opencl` as the environment type. Is that the
expected way to specify OpenCL? I'm not overly familiar.
https://github.com/llvm/llvm-project/pull/99687
__
jhuber6 wrote:
There's a test that's `.cl` that doesn't pass `-opencl` so probably can't rely
on it.
https://github.com/llvm/llvm-project/pull/99687
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directly
S
jhuber6 wrote:
Okay, so the only user of the toolchain is `Darwin`. So I'd need to somehow
rework that logic to make it work.
https://github.com/llvm/llvm-project/pull/99687
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH 1/2] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directl
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH 1/2] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directl
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99687
>From 59901100a2c11d37947938dfb9db5dd1164cbbf5 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 14:07:18 -0500
Subject: [PATCH 1/3] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++
directl
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/99716
Summary:
This block of code wraps around the standard C library includes.
However, the order C library includes are presented is actually
important. If they are visible before the `libc++` headers then it will
cau
jhuber6 wrote:
> Yeah, rewriting the function signature is gonna be quite a hassle. LG for now.
>
> If we change the function signature, does it make easier to set default
> argument?
It'll be similar code, but it would allow us to use the same helpers that the
other targets use.
https://git
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/99716
>From 02012a704c4ad0c666d38bf2b2a7bf74c7f3b2c1 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Fri, 19 Jul 2024 17:33:08 -0500
Subject: [PATCH] [Clang] Fix C library wrappers for offloading
Summary:
This block
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/99716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jhuber6 wrote:
> > Also, apparently there's some driver tests that expect
> > `--target=amdgcn-amd-amdhsa-opencl` as the environment type. Is that the
> > expected way to specify OpenCL? I'm not overly familiar.
>
> That was a mistake from long ago we shouldn't continue. A language is not an
jhuber6 wrote:
ping
https://github.com/llvm/llvm-project/pull/96561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4569,7 +4569,17 @@ OpenMPIRBuilder::createTargetInit(const
LocationDescription &Loc, bool IsSPMD,
Constant *MayUseNestedParallelismVal = ConstantInt::getSigned(Int8, true);
Constant *DebugIndentionLevelVal = ConstantInt::getSigned(Int16, 0);
- Function *Kernel = Buil
@@ -4569,7 +4569,17 @@ OpenMPIRBuilder::createTargetInit(const
LocationDescription &Loc, bool IsSPMD,
Constant *MayUseNestedParallelismVal = ConstantInt::getSigned(Int8, true);
Constant *DebugIndentionLevelVal = ConstantInt::getSigned(Int16, 0);
- Function *Kernel = Buil
https://github.com/jhuber6 approved this pull request.
I guess we did this debugging stuff before, so nothing really changed here.
https://github.com/llvm/llvm-project/pull/99927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -0,0 +1,778 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,778 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,778 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,778 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,778 @@
+//===-- clang-nvlink-wrapper/ClangNVLinkWrapper.cpp - NVIDIA linker util
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/96561
>From 455513d5ca8983443d3ec69919ff9a80eabc8fe3 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 24 Jun 2024 15:14:52 -0500
Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around
'nvlink'
@@ -504,18 +511,23 @@ Expected clang(ArrayRef InputFiles,
const ArgList &Args) {
llvm::copy(LinkerArgs, std::back_inserter(CmdArgs));
}
- // Pass on -mllvm options to the clang invocation.
- for (const opt::Arg *Arg : Args.filtered(OPT_mllvm)) {
-CmdArgs.push_back
@@ -0,0 +1,64 @@
+
+Clang nvlink Wrapper
+
+
+.. contents::
+ :local:
+
+.. _clang-nvlink-wrapper:
+
+Introduction
+
+
+This tools works as a wrapper around the NVIDIA ``nvlink`` linker. The purpose
+of this wrapper is to prov
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/96561
>From 9cd5a58f63621f1707895dcc563bc18bf995c85e Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Mon, 24 Jun 2024 15:14:52 -0500
Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around
'nvlink'
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/96561
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Joseph Huber
Date: 2024-07-22T18:23:02-05:00
New Revision: e391ba07fabd3990edb9be9f3d715abba7e43343
URL:
https://github.com/llvm/llvm-project/commit/e391ba07fabd3990edb9be9f3d715abba7e43343
DIFF:
https://github.com/llvm/llvm-project/commit/e391ba07fabd3990edb9be9f3d715abba7e43343.diff
jhuber6 wrote:
> @jhuber6 this change seems to be causing build failures on some bots:
>
> * https://lab.llvm.org/buildbot/#/builders/174/builds/2129
>
> * https://lab.llvm.org/buildbot/#/builders/190/builds/2383
>
>
> Can you take a look?
Gah, sorry forgot to suppress that error whe
jhuber6 wrote:
> https://lab.llvm.org/buildbot/#/builders/174/builds/2130
>
> Actually I noticed (and I think you already did as well), that there seems to
> be a test failure of nvwrapper.c after you fixed the build error. Just wanted
> to let you know in case you were not already aware.
Yep
https://github.com/jhuber6 created
https://github.com/llvm/llvm-project/pull/89803
Summary:
The AMDGPU toolchain simply took the short name to get the link job
instead of using the common utilities that respect options like
`-fuse-ld`. Any linker that isn't `ld.lld` will fail, however we should
jhuber6 wrote:
Note that this doesn't affect OpenMP or HIP. The former uses the
`clang-linker-wrapper` while the latter calls `lld` directly.
https://github.com/llvm/llvm-project/pull/89803
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/jhuber6 commented:
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.
https://github.com/llvm/llvm-project/pull/89796
_
jhuber6 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
jhuber6 wrote:
> 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 dup
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/89803
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Joseph Huber
Date: 2024-04-24T07:03:51-05:00
New Revision: eaa2eac8ec73a0473655f2da73f347906d14b00f
URL:
https://github.com/llvm/llvm-project/commit/eaa2eac8ec73a0473655f2da73f347906d14b00f
DIFF:
https://github.com/llvm/llvm-project/commit/eaa2eac8ec73a0473655f2da73f347906d14b00f.diff
jhuber6 wrote:
> I disagree, `--gcc-install-dir` is sure an improvement over
> `--gcc-toolchain`, but they're both weaker than the compile time option
> `GCC_INSTALL_PREFIX` because of runtimes.
>
> You're looking to remove `GCC_INSTALL_PREFIX`, then give a clear alternative
> that's equivale
Author: Joseph Huber
Date: 2024-04-28T06:36:09-05:00
New Revision: bfd269d0d0d6cb58235a838eb659eef97e4f2ebf
URL:
https://github.com/llvm/llvm-project/commit/bfd269d0d0d6cb58235a838eb659eef97e4f2ebf
DIFF:
https://github.com/llvm/llvm-project/commit/bfd269d0d0d6cb58235a838eb659eef97e4f2ebf.diff
@@ -673,8 +673,12 @@ std::unique_ptr AllocateTarget(const
llvm::Triple &Triple,
}
case llvm::Triple::spirv64: {
if (os != llvm::Triple::UnknownOS ||
-Triple.getEnvironment() != llvm::Triple::UnknownEnvironment)
+Triple.getEnvironment() != llvm::Triple::
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+namespace {
+const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+} //
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions
&Opts,
BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder);
DefineStd(Builder, "SPIRV64", Opts);
}
+
+namespace {
+const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {});
+
+} //
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
StringRef Prefix =
llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
if (!Prefix.empty()) {
+if (Prefix == "spv" &&
+getTarget().getTr
1301 - 1400 of 2685 matches
Mail list logo