@@ -527,9 +527,11 @@ Expected clang(ArrayRef InputFiles,
const ArgList &Args) {
// Forward all of the `--offload-opt` and similar options to the device.
if (linkerSupportsLTO(Args)) {
-for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm))
+for (auto
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/102483
>From 9e8a8e78f3014324d8aa35dd1615b3f5720a5cb4 Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Wed, 7 Aug 2024 19:10:33 -0400
Subject: [PATCH 1/3] [Clang] Simplify specifying passes via -Xoffload-linker
https://github.com/jdenny-ornl created
https://github.com/llvm/llvm-project/pull/102521
When working on very busy systems, check-offload frequently fails many tests
with this diagnostic:
```
clang: error: cannot determine amdgcn architecture:
/tmp/llvm/build/bin/amdgpu-arch: Child timed out:
jdenny-ornl wrote:
> Maybe we should bump the default time up? I don't know what's reasonable in
> this area, but the GPU drivers have a bad habit of deadlocking, so this is to
> prevent that.
I don't know the right value either. If no one else is complaining, maybe 10s
is fine under normal
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/102521
>From 6546428805b52f1b6f350193ab08ff027892710f Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Thu, 8 Aug 2024 15:02:04 -0400
Subject: [PATCH 1/2] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout
https://github.com/jdenny-ornl edited
https://github.com/llvm/llvm-project/pull/102521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -116,6 +117,15 @@ ToolChain::executeToolChainProgram(StringRef Executable,
};
std::string ErrorMessage;
+ int SecondsToWait = DefaultSecondsToWait;
+ if (std::optional Str =
+ llvm::sys::Process::GetEnv("CLANG_TOOL_CHAIN_PROGRAM_WAIT")) {
+int Val = std::
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/102521
>From 6546428805b52f1b6f350193ab08ff027892710f Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Thu, 8 Aug 2024 15:02:04 -0400
Subject: [PATCH 1/3] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout
jdenny-ornl wrote:
> Also, just be aware that if you set this, it will apply to everything. So if
> you had a particularly long link job, probably would be a good idea to make
> it wait forever.
Not sure I understand. grep found 2 uses of executeToolChainProgram: calling
amdgpu-arch and nvpt
Author: Joel E. Denny
Date: 2021-04-30T16:26:59-04:00
New Revision: 82e99f50351dd83d854f45bab3d91d4e6ad6450e
URL:
https://github.com/llvm/llvm-project/commit/82e99f50351dd83d854f45bab3d91d4e6ad6450e
DIFF:
https://github.com/llvm/llvm-project/commit/82e99f50351dd83d854f45bab3d91d4e6ad6450e.diff
https://github.com/jdenny-ornl created
https://github.com/llvm/llvm-project/pull/96704
The goal of this patch is to enable utilizing LLVM plugin passes and remarks
for GPU offload code at link time. Specifically, this patch extends
clang-linker-wrapper's `--offload-opt` (and consequently `-ml
@@ -0,0 +1,10 @@
+// Check that these simple command lines for listing LLVM options are
supported,
jdenny-ornl wrote:
Grepping for -help in llvm's test suite finds various such tests. The point
here is to make sure `--offload-opt=--help can list these opt-like
@@ -0,0 +1,86 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
+
+; REQUIRES: llvm-plugins, llvm-examples
+; REQUIRES: x86-registered-target
+; REQUIRES: amdgpu-registered-target
+
+; Setup.
+; RUN: split-file %s %t
+; RUN: opt -o %t/host-x86_64-unknown-li
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/96704
>From 98e04dd372b82c2c5309a6148bb49eb1012a97ee Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Tue, 25 Jun 2024 17:29:49 -0400
Subject: [PATCH 1/2] [LinkerWrapper] Extend with usual pass options
The goa
@@ -0,0 +1,86 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
+
+; REQUIRES: llvm-plugins, llvm-examples
+; REQUIRES: x86-registered-target
+; REQUIRES: amdgpu-registered-target
+
+; Setup.
+; RUN: split-file %s %t
+; RUN: opt -o %t/host-x86_64-unknown-li
jdenny-ornl wrote:
> Makes sense overall. However in the future I'm looking to move away from the
> home-baked LTO pipeline in favor of giving it to the linker. That allows me
> to set up libraries as a part of the target toolchain in the driver. I guess
> for that I'll just need to forward `-
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/96704
>From 98e04dd372b82c2c5309a6148bb49eb1012a97ee Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Tue, 25 Jun 2024 17:29:49 -0400
Subject: [PATCH 1/3] [LinkerWrapper] Extend with usual pass options
The goa
@@ -0,0 +1,86 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
+
+; REQUIRES: llvm-plugins, llvm-examples
+; REQUIRES: x86-registered-target
+; REQUIRES: amdgpu-registered-target
+
+; Setup.
+; RUN: split-file %s %t
+; RUN: opt -o %t/host-x86_64-unknown-li
@@ -0,0 +1,77 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
jdenny-ornl wrote:
Yeah, I suppose that's just as good. I do wonder if this is really the right
directory for these tests at all. Its lit.local.cfg has a %clang_cc1
substi
https://github.com/jdenny-ornl updated
https://github.com/llvm/llvm-project/pull/96704
>From 98e04dd372b82c2c5309a6148bb49eb1012a97ee Mon Sep 17 00:00:00 2001
From: "Joel E. Denny"
Date: Tue, 25 Jun 2024 17:29:49 -0400
Subject: [PATCH 1/4] [LinkerWrapper] Extend with usual pass options
The goa
@@ -0,0 +1,77 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
jdenny-ornl wrote:
OK, I did that. I used opt to discard the inline attribute that clang
introduces. If you know of a better way that doesn't perform inlining before
the c
https://github.com/jdenny-ornl edited
https://github.com/llvm/llvm-project/pull/96704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,77 @@
+; Check various clang-linker-wrapper pass options after -offload-opt.
jdenny-ornl wrote:
noinline prevents the inline pass in the test from running.
https://github.com/llvm/llvm-project/pull/96704
___
https://github.com/jdenny-ornl edited
https://github.com/llvm/llvm-project/pull/96704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdenny-ornl wrote:
> I think this looks good overall,
Thanks for the fast reviews.
> though I'd like to hear some other clang maintainers chime in on the LIT
> config changes.
For reference, I mostly copied that from the llvm test suite config.
https://github.com/llvm/llvm-project/pull/96704
jdenny-ornl wrote:
For some codes, I get the following error for a gfx906:
```
LLVM ERROR: Relocation for CG Profile could not be created: unknown relocation
name
```
I see it for OpenMC, but the following is a simpler example:
```
$ cat test.c
#include
#include
__attribute__((noinline))
d
@@ -1311,4 +1314,96 @@ COMPILER_RT_VISIBILITY int
__llvm_profile_set_file_object(FILE *File,
return 0;
}
+int __llvm_write_custom_profile(const char *Target,
+const __llvm_profile_data *DataBegin,
+const __llvm
@@ -0,0 +1,82 @@
+// RUN: %libomptarget-compile-generic -fprofile-generate-gpu
jdenny-ornl wrote:
When targeting a V100, this command fails for me in both pgo1.c and pgo2.c. In
the LTO case:
```
LLVM ERROR: Circular dependency found in global variable set
```
@@ -1,12 +1,17 @@
-// RUN: %libomptarget-compile-generic -fprofile-instr-generate \
-// RUN: -Xclang "-fprofile-instrument=clang"
-// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \
-// RUN: --check-prefix="CLANG-PGO"
// RUN: %libomptarget-compile-generic -fprofil
@@ -1311,4 +1314,96 @@ COMPILER_RT_VISIBILITY int
__llvm_profile_set_file_object(FILE *File,
return 0;
}
+int __llvm_write_custom_profile(const char *Target,
+const __llvm_profile_data *DataBegin,
+const __llvm
@@ -1,12 +1,17 @@
-// RUN: %libomptarget-compile-generic -fprofile-instr-generate \
-// RUN: -Xclang "-fprofile-instrument=clang"
-// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \
-// RUN: --check-prefix="CLANG-PGO"
// RUN: %libomptarget-compile-generic -fprofil
jdenny-ornl wrote:
> > For some codes, I get the following error for a gfx906:
> > ```
> > LLVM ERROR: Relocation for CG Profile could not be created: unknown
> > relocation name
> > ```
> Not sure if this is still relevant, but I think #114617 should fix this
> issue. The ASM builder was try
101 - 132 of 132 matches
Mail list logo