[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-20 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/92294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-15 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/92294 None >From cbeb6bcbd4442af709823af75ca82a2d33be9482 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 May 2024 10:12:45 -0700 Subject: [PATCH] [NFC][amdgpuarch] Correct file names in file header

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/92027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread Jacob Lambert via cfe-commits
lamb-j wrote: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fapinotes https://github.com/llvm/llvm-project/pull/92027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [NFC] Add missing spaces in BoolOption for apinotes (PR #92027)

2024-05-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/92027 None >From b68e9e234c1ccd62be507fcb1a0ab77241216f75 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 13 May 2024 13:24:48 -0700 Subject: [PATCH] [NFC] Add missing spaces in BoolOption for apinotes ---

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-08 Thread Jacob Lambert via cfe-commits
lamb-j wrote: https://github.com/llvm/llvm-project/pull/91495 Follow up PR to fix warning with now-unused private variable in BackendConsumer class (FileMgr) https://github.com/llvm/llvm-project/pull/85672 ___ cfe-commits mailing list

[clang] [clang][CodeGen] Remove now-unused FileManager variable (PR #91495)

2024-05-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/91495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Remove now-unused FileManager variable (PR #91495)

2024-05-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/91495 >From 4c687db250dabbc13557df46433a3c1cb3dff01e Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 8 May 2024 08:52:14 -0700 Subject: [PATCH 1/2] [clang][CodeGen] Remove now-unused FileManager variable Fixes

[clang] [clang][CodeGen] Remove now-unused FileManager variable (PR #91495)

2024-05-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/91495 Fixes "error: private field 'FileMgr' is not used" >From 4c687db250dabbc13557df46433a3c1cb3dff01e Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 8 May 2024 08:52:14 -0700 Subject: [PATCH]

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/85672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-03 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/7] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-02 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/85672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-02 Thread Jacob Lambert via cfe-commits
lamb-j wrote: Switched the option from a cl::opt to a Clang/CodeGen option. Also added a LIT test which tests both -mlink-builtin-bitcode-postopt and -mno-link-builtin-bitcode-postopt https://github.com/llvm/llvm-project/pull/85672 ___ cfe-commits

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-02 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/6] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-02 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/5] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > @lamb-j I appreciate your carrying out these performance tests! > > Would you be open to providing an option to enable post-link optimization > that could be off by default for now? Currently if a user doesn't supply the new "-link-builtin-bitcodes-postopt" option, linking

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-05-01 Thread Jacob Lambert via cfe-commits
lamb-j wrote: I've been working on testing this patch with an array of OpenCL benchmarks over the past month. We did some high-level regression testing with the following benchmarks: BlackMagic Linpack_Dgemm babelstream-Double babelstream-Float chimex clfft clmem clpeak-Double-precision

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-04-30 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/5] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-04-29 Thread Jacob Lambert via cfe-commits
@@ -28,12 +28,8 @@ PreservedAnalyses LinkInModulesPass::run(Module , ModuleAnalysisManager ) { if (!BC) return PreservedAnalyses::all(); - // Re-load bitcode modules from files - if (BC->ReloadModules()) -report_fatal_error("Bitcode module re-loading failed,

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-03-18 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/4] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-03-18 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/3] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-03-18 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/85672 >From aff1a762a73ce30cde38a6fcbbed8a3e4f0b5366 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Mon, 18 Mar 2024 10:19:38 -0700 Subject: [PATCH 1/2] [clang][CodeGen] Omit pre-opt link when post-opt link

[clang] [clang][CodeGen] Omit pre-opt link when post-opt is link requested (PR #85672)

2024-03-18 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/85672 Currently, when the -relink-builtin-bitcodes-postop option is used we link builtin bitcodes twice: once before optimization, and again after optimization. With this change, we omit the pre-opt linking when the

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-15 Thread Jacob Lambert via cfe-commits
@@ -257,37 +281,19 @@ bool BackendConsumer::LinkInModules(llvm::Module *M, bool ShouldLinkFiles) { CurLinkModule = LM.Module.get(); bool Err; lamb-j wrote: Oversight on my part. Should be fixed by https://github.com/llvm/llvm-project/pull/81777

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/81777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/81777 Add missing error check. This resolves "error: variable 'Err' set but not used" warnings >From b802c3456e44d5cc39ce6d5bf93fc549e38a7a12 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 14 Feb 2024

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/81693 >From aff288af78b94dbd7ef317ce368f25a305798adc Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 13 Feb 2024 17:30:21 -0800 Subject: [PATCH 1/3] [clang][CodeGen] Shift relink option implementation away

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/81693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/81693 >From aff288af78b94dbd7ef317ce368f25a305798adc Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 13 Feb 2024 17:30:21 -0800 Subject: [PATCH 1/2] [clang][CodeGen] Shift relink option implementation away

[clang] [clang][CodeGen] Shift relink option implementation away from module cloning (PR #81693)

2024-02-13 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/81693 We recently implemented a new option allowing relinking of bitcode modules via the "-mllvm -relink-builtin-bitcode-postop" option. This implementation relied on llvm::CloneModule() in order to pass copies to

[clang] [NFC][clang][Driver] Specify options for with -save-temps= (PR #80921)

2024-02-09 Thread Jacob Lambert via cfe-commits
@@ -5392,7 +5392,9 @@ def regcall4 : Flag<["-"], "regcall4">, Group, MarshallingInfoFlag>; def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, - HelpText<"Save intermediate

[clang] [NFC][clang][Driver] Specify options for with -save-temps= (PR #80921)

2024-02-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/80921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang][Driver] Specify options for with -save-temps= (PR #80921)

2024-02-07 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/80921 >From 9f021f6d2b99ae73c47313ddc6043ab2af926f23 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 6 Feb 2024 17:57:12 -0800 Subject: [PATCH 1/2] [NFC][clang][Driver] Specify options for with -save-temps=

[clang] [NFC][clang][Driver] Specify options for with -save-temps= (PR #80921)

2024-02-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/80921 None >From 9f021f6d2b99ae73c47313ddc6043ab2af926f23 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 6 Feb 2024 17:57:12 -0800 Subject: [PATCH] [NFC][clang][Driver] Specify options for with -save-temps=

[clang] [clang-offload-bundler][NFC] Remove blank line in doc (PR #73968)

2023-11-30 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/73968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-offload-bundler][NFC] Remove blank line in doc (PR #73968)

2023-11-30 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/73968 None >From 5582993e9c9aadf30ca2780cd37a280fe32fb439 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Thu, 30 Nov 2023 10:25:55 -0800 Subject: [PATCH] [clang-offload-bundler][NFC] Remove blank line in doc ---

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/73709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From 995706601f9f4aed021a9003ad79ca3e7e1d18af Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/7] [clang-offload-bundler] Add support for -check-input-archive

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From 995706601f9f4aed021a9003ad79ca3e7e1d18af Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/5] [clang-offload-bundler] Add support for -check-input-archive

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 5bfc0608073cd699e42a23b07d68b4572a14fcbd Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/5] [CodeGen] Add conditional to module cloning in bitcode

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 7d2ee902f1fb1dc0cd355b4b51fda32309f45ccb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/5] [CodeGen] Add conditional to module cloning in bitcode

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From e69976a8923b134e051dd2756233c0285d3c9880 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/4] [clang-offload-bundler] Add support for -check-input-archive

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From e69976a8923b134e051dd2756233c0285d3c9880 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/3] [clang-offload-bundler] Add support for -check-input-archive

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From e69976a8923b134e051dd2756233c0285d3c9880 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/2] [clang-offload-bundler] Add support for -check-input-archive

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-28 Thread Jacob Lambert via cfe-commits
lamb-j wrote: For context, these changes reconcile differences between the upstream clang-offload-bundler and the AMD Fork offload bundler (https://github.com/RadeonOpenCompute/llvm-project/tree/amd-stg-open) https://github.com/llvm/llvm-project/pull/73709

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-28 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/73709 In this patch, we add support for checking a heterogeneous archive. We also significantly improve the clang-offload-bundler documentation. >From e69976a8923b134e051dd2756233c0285d3c9880 Mon Sep 17 00:00:00 2001

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-16 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 3a2a066eeadce6b8f3cd5645965ffe564e68fba3 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/3] [CodeGen] Add conditional to module cloning in bitcode

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-16 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 3a2a066eeadce6b8f3cd5645965ffe564e68fba3 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/2] [CodeGen] Add conditional to module cloning in bitcode

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-15 Thread Jacob Lambert via cfe-commits
@@ -251,32 +255,50 @@ bool BackendConsumer::LinkInModules(llvm::Module *M, bool ShouldLinkFiles) { } CurLinkModule = LM.Module.get(); - -// TODO: If CloneModule() is updated to support cloning of unmaterialized -// modules, we can remove this bool Err;

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-15 Thread Jacob Lambert via cfe-commits
@@ -48,428 +49,365 @@ #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/YAMLTraits.h" #include "llvm/Transforms/IPO/Internalize.h" +#include "llvm/Transforms/Utils/Cloning.h" -#include #include using namespace clang; using namespace llvm; #define

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-15 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/72478 Now that we have a commandline option dictating a second link step, (-relink-builtin-bitcode-postop), we can condition the module creation when linking in bitcode modules. This aims to improve performance by

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-15 Thread Jacob Lambert via cfe-commits
@@ -48,428 +49,365 @@ #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/YAMLTraits.h" #include "llvm/Transforms/IPO/Internalize.h" +#include "llvm/Transforms/Utils/Cloning.h" -#include #include using namespace clang; using namespace llvm; #define

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-09 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-09 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-09 Thread Jacob Lambert via cfe-commits
@@ -113,7 +120,7 @@ class EmitAssemblyHelper { const CodeGenOptions const clang::TargetOptions const LangOptions - Module *TheModule; + llvm::Module *TheModule; lamb-j wrote: Without the qualification, we get the following: In file included from

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-09 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-09 Thread Jacob Lambert via cfe-commits
@@ -113,7 +120,7 @@ class EmitAssemblyHelper { const CodeGenOptions const clang::TargetOptions const LangOptions - Module *TheModule; + llvm::Module *TheModule; lamb-j wrote: When including the new BackendConsumer.h header file to BackendUtils.cpp,

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 0de3e4a4b460ba407da1acbcf4ef21916ded69e2 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] [CodeGen] Implement post-opt linking option for builtin bitocdes (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-08 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-07 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 86535608c7e79d31260e2a358b7a00f7b747e8bd Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > this doesn't really apply since you changed the function signature so it > needs to be reformatted. I don't follow the logic there. The function signature can have a style as well. And I think this is actually a good example to demonstrate a reason not to reformat if we look

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > > Just do what the formatter says, not every file is 100% clang-formatted so > there's bits of old code that haven't been properly cleaned yet. This was the > same line that I thought looked wrong so it should probably be fixed. Using > `git clang-format HEAD~1` only formats

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
lamb-j wrote: I am getting this from the formatter: - void RunOptimizationPipeline(BackendAction Action, - std::unique_ptr , - std::unique_ptr , - BackendConsumer *BC); + void RunOptimizationPipeline( +

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
@@ -0,0 +1,29 @@ +//===-- LinkInModulesPass.cpp - Module Linking pass --- C++ -*-===// +// +// 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:

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j edited https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
@@ -48,428 +49,369 @@ #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/YAMLTraits.h" #include "llvm/Transforms/IPO/Internalize.h" +#include "llvm/Transforms/Utils/Cloning.h" -#include #include using namespace clang; using namespace llvm; #define

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
@@ -155,10 +162,10 @@ class EmitAssemblyHelper { return F; } - void - RunOptimizationPipeline(BackendAction Action, + void RunOptimizationPipeline(BackendAction Action, std::unique_ptr , - std::unique_ptr ); +

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
@@ -1035,6 +1043,13 @@ void EmitAssemblyHelper::RunOptimizationPipeline( } } + // Re-link against any bitcodes supplied via the -mlink-builtin-bitcode option + // Some optimizations may generate new function calls that would not have + // been linked

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-11-06 Thread Jacob Lambert via cfe-commits
@@ -1035,6 +1043,13 @@ void EmitAssemblyHelper::RunOptimizationPipeline( } } + // Re-link against any bitcodes supplied via the -mlink-builtin-bitcode option + // Some optimizations may generate new function calls that would not have + // been linked

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-31 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-19 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/69371 >From 25302c315360c166f34ab9acde2561dc7865b3bb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 17 Oct 2023 12:01:15 -0700 Subject: [PATCH 1/3] [NFC] Refactor BackendConsumer class definition into new

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > This approach assumes that whatever the function call was transformed into > also exists in the same library, which isn't necessarily true. True, good point. But I don't think it's necessarily due to this approach, but more of how AMDGPULibCalls is implemented. It seems like

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
lamb-j wrote: sincos() is just one example. There are several other cases that can trigger this issue. fold_rootn() generates new function calls for square and cubic roots, fold_pow() does a similar thing for specific powers (ex 2) We did try disabling -llvm-prelink, and it did lead to a

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/69371 This set of patches updates device library linking and optimization to do the following: Link Optimize Link (New) This handles the edge case where optimization introduces new device library functions, such as

[clang] 0661533 - [AMDGPU] Prepend --no-undefined option for linker instead of append

2023-08-23 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2023-08-23T12:25:01-07:00 New Revision: 0661533e4168202476d660d3b18bbe13db16cc43 URL: https://github.com/llvm/llvm-project/commit/0661533e4168202476d660d3b18bbe13db16cc43 DIFF: https://github.com/llvm/llvm-project/commit/0661533e4168202476d660d3b18bbe13db16cc43.diff

[clang] f3b9912 - [clang-offload-bundler] Fix error with regex in bundler test

2023-03-14 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2023-03-14T19:51:26-07:00 New Revision: f3b9912026894ecca8925c974dd7ca16b0f1e265 URL: https://github.com/llvm/llvm-project/commit/f3b9912026894ecca8925c974dd7ca16b0f1e265 DIFF: https://github.com/llvm/llvm-project/commit/f3b9912026894ecca8925c974dd7ca16b0f1e265.diff

[clang] 65fb636 - [clang-offload-bundler] Fix test failures and document typo

2023-03-14 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2023-03-14T19:14:42-07:00 New Revision: 65fb636bd462687980935979f2f36ec992e15c84 URL: https://github.com/llvm/llvm-project/commit/65fb636bd462687980935979f2f36ec992e15c84 DIFF: https://github.com/llvm/llvm-project/commit/65fb636bd462687980935979f2f36ec992e15c84.diff

[clang] e48ae0d - [clang-offload-bundler] Standardize TargetID field for bundler

2023-03-14 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2023-03-14T14:12:31-07:00 New Revision: e48ae0dbd80d58ce8eded9e55f0b1262d52517af URL: https://github.com/llvm/llvm-project/commit/e48ae0dbd80d58ce8eded9e55f0b1262d52517af DIFF: https://github.com/llvm/llvm-project/commit/e48ae0dbd80d58ce8eded9e55f0b1262d52517af.diff

[clang] b47d4df - Switch ABI references to env/environment

2023-03-13 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2023-03-13T16:19:31-07:00 New Revision: b47d4df25c696739dbbb9e373ffd8a501eabcfef URL: https://github.com/llvm/llvm-project/commit/b47d4df25c696739dbbb9e373ffd8a501eabcfef DIFF: https://github.com/llvm/llvm-project/commit/b47d4df25c696739dbbb9e373ffd8a501eabcfef.diff

[clang] f9de860 - [Driver][test] Fix test by creating empty archive instead of empty file

2022-12-07 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-12-07T11:50:11-08:00 New Revision: f9de860ca4c4b5827498dc096a26d9ebdf236181 URL: https://github.com/llvm/llvm-project/commit/f9de860ca4c4b5827498dc096a26d9ebdf236181 DIFF: https://github.com/llvm/llvm-project/commit/f9de860ca4c4b5827498dc096a26d9ebdf236181.diff

[clang] 6b992bc - [Driver][test] Fix test by creating empty archive instead of empty file

2022-12-05 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-12-05T15:39:09-08:00 New Revision: 6b992bcce0c5a86f57c83dd8d0ac9e63bcfc5521 URL: https://github.com/llvm/llvm-project/commit/6b992bcce0c5a86f57c83dd8d0ac9e63bcfc5521 DIFF: https://github.com/llvm/llvm-project/commit/6b992bcce0c5a86f57c83dd8d0ac9e63bcfc5521.diff

[clang] 0f3f357 - [clang-offload-bundler] Library-ize ClangOffloadBundler

2022-07-27 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-07-27T11:54:38-07:00 New Revision: 0f3f357e26cfdb887866215b234138e66fd0c4c9 URL: https://github.com/llvm/llvm-project/commit/0f3f357e26cfdb887866215b234138e66fd0c4c9 DIFF: https://github.com/llvm/llvm-project/commit/0f3f357e26cfdb887866215b234138e66fd0c4c9.diff

[clang] 8348c40 - [clang-offload-bundler] Library-ize ClangOffloadBundler

2022-07-26 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-07-26T10:05:22-07:00 New Revision: 8348c4095600ec2c0beee293267832799d2ebee3 URL: https://github.com/llvm/llvm-project/commit/8348c4095600ec2c0beee293267832799d2ebee3 DIFF: https://github.com/llvm/llvm-project/commit/8348c4095600ec2c0beee293267832799d2ebee3.diff

[clang] afcc6ba - [clang][HIP] Updating driver to enable archive/bitcode to bitcode linking when targeting HIPAMD toolchain

2022-04-21 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-04-21T09:24:33-07:00 New Revision: afcc6baac52fcc91d1636f6803f5c230e7018016 URL: https://github.com/llvm/llvm-project/commit/afcc6baac52fcc91d1636f6803f5c230e7018016 DIFF: https://github.com/llvm/llvm-project/commit/afcc6baac52fcc91d1636f6803f5c230e7018016.diff

[clang] edf7e02 - [clang][NFC] Fix Typo

2022-01-28 Thread Jacob Lambert via cfe-commits
Author: Jacob Lambert Date: 2022-01-28T11:55:46-08:00 New Revision: edf7e026a8b4df5df7febaef126888f1ce65ebf6 URL: https://github.com/llvm/llvm-project/commit/edf7e026a8b4df5df7febaef126888f1ce65ebf6 DIFF: https://github.com/llvm/llvm-project/commit/edf7e026a8b4df5df7febaef126888f1ce65ebf6.diff