[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via 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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I think this looks good overall, though I'd like to hear some other clang maintainers chime in on the LIT config changes. https://github.com/llvm/llvm-project/pull/96704 ___ cfe-commits mailing li

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,77 @@ +; Check various clang-linker-wrapper pass options after -offload-opt. jhuber6 wrote: I see, probably fine then. https://github.com/llvm/llvm-project/pull/96704 ___ cfe-commits mailing list cfe-commits

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via 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 ___

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,77 @@ +; Check various clang-linker-wrapper pass options after -offload-opt. jhuber6 wrote: -disable-O0-optnone handles the optnone, don't think `noinline` affects that much. https://github.com/llvm/llvm-project/pull/96704 ___

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,77 @@ +; Check various clang-linker-wrapper pass options after -offload-opt. jhuber6 wrote: Hm, is this really the only LLVM-IR file in the Driver directory? I guess it makes sense, though you could probably just do what the other linker wrapper test

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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 `-

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,10 @@ +// Check that these simple command lines for listing LLVM options are supported, jhuber6 wrote: Do we have any other tests that just check the output for `--help`? Might be a little excessive. https://github.com/llvm/llvm-project/pull/96704 _

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: 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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joseph Huber via cfe-commits
@@ -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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joel E. Denny (jdenny-ornl) Changes 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

[clang] [LinkerWrapper] Extend with usual pass options (PR #96704)

2024-06-25 Thread Joel E. Denny via cfe-commits
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