[clang] 42a1fb5 - [LinkerWrapper][Fix} Fix bad alignment from extracted archive members

2022-05-11 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-11T16:56:41-04:00 New Revision: 42a1fb5ca56c494e25419a97057a9526f3e8608d URL: https://github.com/llvm/llvm-project/commit/42a1fb5ca56c494e25419a97057a9526f3e8608d DIFF: https://github.com/llvm/llvm-project/commit/42a1fb5ca56c494e25419a97057a9526f3e8608d.diff

[clang] 1bfa88d - [LinkerWrapper] Remove stripping features from the linker wrapper

2022-05-12 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-12T20:45:49-04:00 New Revision: 1bfa88d0c5ad9e5ef06b770e8ca4d6d3a3aaca2d URL: https://github.com/llvm/llvm-project/commit/1bfa88d0c5ad9e5ef06b770e8ca4d6d3a3aaca2d DIFF: https://github.com/llvm/llvm-project/commit/1bfa88d0c5ad9e5ef06b770e8ca4d6d3a3aaca2d.diff

[clang] 8a0fb96 - [LinkerWrapper] Group static libraries in their own buffer

2022-05-12 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-12T20:45:49-04:00 New Revision: 8a0fb965f6992078bb3d8bd68d3995e1150fe442 URL: https://github.com/llvm/llvm-project/commit/8a0fb965f6992078bb3d8bd68d3995e1150fe442 DIFF: https://github.com/llvm/llvm-project/commit/8a0fb965f6992078bb3d8bd68d3995e1150fe442.diff

[clang] 002a63f - [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T14:38:35-04:00 New Revision: 002a63f937d91c0aad192f2d4997317fb277b32a URL: https://github.com/llvm/llvm-project/commit/002a63f937d91c0aad192f2d4997317fb277b32a DIFF: https://github.com/llvm/llvm-project/commit/002a63f937d91c0aad192f2d4997317fb277b32a.diff

[clang] 5189f63 - [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T14:38:39-04:00 New Revision: 5189f634a113b06fc2f2e8c6c021c0083f59bfb8 URL: https://github.com/llvm/llvm-project/commit/5189f634a113b06fc2f2e8c6c021c0083f59bfb8 DIFF: https://github.com/llvm/llvm-project/commit/5189f634a113b06fc2f2e8c6c021c0083f59bfb8.diff

[clang] af757f8 - [OpenMP] Don't set device runtime debugging flags if using '-nogpulib'

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T14:38:43-04:00 New Revision: af757f89806e03229837425b77839498db470ef8 URL: https://github.com/llvm/llvm-project/commit/af757f89806e03229837425b77839498db470ef8 DIFF: https://github.com/llvm/llvm-project/commit/af757f89806e03229837425b77839498db470ef8.diff

[clang] 4638ae3 - [OpenMP] Use the new OpenMP device static library when doing LTO

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T14:38:55-04:00 New Revision: 4638ae3a8575d988df856116102c1ccd15583c00 URL: https://github.com/llvm/llvm-project/commit/4638ae3a8575d988df856116102c1ccd15583c00 DIFF: https://github.com/llvm/llvm-project/commit/4638ae3a8575d988df856116102c1ccd15583c00.diff

[clang] 7dc23ab - [CUDA] Add a flag to manually specify the target feature to use with CUDA

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T16:30:58-04:00 New Revision: 7dc23abbd3b298016cc6ae49a124f414e76903b6 URL: https://github.com/llvm/llvm-project/commit/7dc23abbd3b298016cc6ae49a124f414e76903b6 DIFF: https://github.com/llvm/llvm-project/commit/7dc23abbd3b298016cc6ae49a124f414e76903b6.diff

[clang] 4205f4a - [Cuda] Add the features using the last argument

2022-05-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-13T18:05:02-04:00 New Revision: 4205f4aba4aff74fa7681c3f991ef5fdaed48d35 URL: https://github.com/llvm/llvm-project/commit/4205f4aba4aff74fa7681c3f991ef5fdaed48d35 DIFF: https://github.com/llvm/llvm-project/commit/4205f4aba4aff74fa7681c3f991ef5fdaed48d35.diff

[clang] b653b40 - [OpenMP] Don't build the offloading driver without a source input

2022-05-16 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-16T18:19:02-04:00 New Revision: b653b409ff44b09ade04bb6e579f5f9790424611 URL: https://github.com/llvm/llvm-project/commit/b653b409ff44b09ade04bb6e579f5f9790424611 DIFF: https://github.com/llvm/llvm-project/commit/b653b409ff44b09ade04bb6e579f5f9790424611.diff

[clang] f371019 - [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

2022-05-24 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-24T09:11:02-04:00 New Revision: f37101983fc9fabbbde4b10f613ed248a424d71a URL: https://github.com/llvm/llvm-project/commit/f37101983fc9fabbbde4b10f613ed248a424d71a DIFF: https://github.com/llvm/llvm-project/commit/f37101983fc9fabbbde4b10f613ed248a424d71a.diff

[clang] 3723868 - [OpenMP] Fix file arguments for embedding bitcode in the linker wrapper

2022-05-24 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-24T13:45:52-04:00 New Revision: 3723868d9e07de5d4a7468a4c2c74fc8517afc14 URL: https://github.com/llvm/llvm-project/commit/3723868d9e07de5d4a7468a4c2c74fc8517afc14 DIFF: https://github.com/llvm/llvm-project/commit/3723868d9e07de5d4a7468a4c2c74fc8517afc14.diff

[clang] 8a1984c - [Clang][Docs] Document `-Xoffload-linker` flag

2022-05-25 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-25T13:33:10-04:00 New Revision: 8a1984c25e2c982a9388c14bdaf99bdcd3e26bd4 URL: https://github.com/llvm/llvm-project/commit/8a1984c25e2c982a9388c14bdaf99bdcd3e26bd4 DIFF: https://github.com/llvm/llvm-project/commit/8a1984c25e2c982a9388c14bdaf99bdcd3e26bd4.diff

[clang] b7c8c4d - [Clang] Introduce `--offload-link` option to perform offload device linking

2022-05-25 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-25T16:30:53-04:00 New Revision: b7c8c4d8cf07d2e9e8cd157bccc8bd9e7c76415a URL: https://github.com/llvm/llvm-project/commit/b7c8c4d8cf07d2e9e8cd157bccc8bd9e7c76415a DIFF: https://github.com/llvm/llvm-project/commit/b7c8c4d8cf07d2e9e8cd157bccc8bd9e7c76415a.diff

[clang] 1bae02b - [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-26 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-26T09:18:22-04:00 New Revision: 1bae02b77335eb1a01d9a0bb36c2b2a29dfdd5d9 URL: https://github.com/llvm/llvm-project/commit/1bae02b77335eb1a01d9a0bb36c2b2a29dfdd5d9 DIFF: https://github.com/llvm/llvm-project/commit/1bae02b77335eb1a01d9a0bb36c2b2a29dfdd5d9.diff

[clang] 958a885 - [LinkerWrapper] Rework the linker wrapper and use owning binaries

2022-06-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-22T09:24:10-04:00 New Revision: 958a8850508088766fe19202037e2f46805e2c65 URL: https://github.com/llvm/llvm-project/commit/958a8850508088766fe19202037e2f46805e2c65 DIFF: https://github.com/llvm/llvm-project/commit/958a8850508088766fe19202037e2f46805e2c65.diff

[clang] 21e29b6 - [Clang] Allow multiple comma separated arguments to `--offload-arch=`

2022-06-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-22T09:25:04-04:00 New Revision: 21e29b6ce734cca1557aa801740078d98c3ff447 URL: https://github.com/llvm/llvm-project/commit/21e29b6ce734cca1557aa801740078d98c3ff447 DIFF: https://github.com/llvm/llvm-project/commit/21e29b6ce734cca1557aa801740078d98c3ff447.diff

[clang] a9fd8b9 - [LinkerWrapper] Fix calls to deleted Error constructor on older compilers

2022-06-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-22T09:39:23-04:00 New Revision: a9fd8b911331dad1b5f94e3aba5ce0927e632ade URL: https://github.com/llvm/llvm-project/commit/a9fd8b911331dad1b5f94e3aba5ce0927e632ade DIFF: https://github.com/llvm/llvm-project/commit/a9fd8b911331dad1b5f94e3aba5ce0927e632ade.diff

[clang] 7597988 - [LinkerWrapper][NFC] Change interface to use a StringRef to TempFiles

2022-06-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-22T13:16:37-04:00 New Revision: 75979887291426acd282d638795913697b65cecb URL: https://github.com/llvm/llvm-project/commit/75979887291426acd282d638795913697b65cecb DIFF: https://github.com/llvm/llvm-project/commit/75979887291426acd282d638795913697b65cecb.diff

[clang] 6e68892 - [Offloading] Embed the target features in the OffloadBinary

2022-06-23 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-23T13:15:01-04:00 New Revision: 6e6889288cdc8433f33723d977c99be5f07423f4 URL: https://github.com/llvm/llvm-project/commit/6e6889288cdc8433f33723d977c99be5f07423f4 DIFF: https://github.com/llvm/llvm-project/commit/6e6889288cdc8433f33723d977c99be5f07423f4.diff

[clang] 4d3c010 - [CUDA] Do not embed a fatbinary when using the new driver

2022-06-23 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-23T15:40:43-04:00 New Revision: 4d3c010f1d012ade0ca36fdd7bc8b8baeb8df1f2 URL: https://github.com/llvm/llvm-project/commit/4d3c010f1d012ade0ca36fdd7bc8b8baeb8df1f2 DIFF: https://github.com/llvm/llvm-project/commit/4d3c010f1d012ade0ca36fdd7bc8b8baeb8df1f2.diff

[clang] 1dcbe03 - [Binary] Further improve malformed input handling for the OffloadBinary

2022-06-24 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-24T09:57:44-04:00 New Revision: 1dcbe03c32c197324e840717bb8dbf0b925ca433 URL: https://github.com/llvm/llvm-project/commit/1dcbe03c32c197324e840717bb8dbf0b925ca433 DIFF: https://github.com/llvm/llvm-project/commit/1dcbe03c32c197324e840717bb8dbf0b925ca433.diff

[clang] 56ab966 - [CUDA] Stop adding CUDA features twice

2022-06-29 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-29T09:34:09-04:00 New Revision: 56ab966a04dd22570fcb18276e2409c94e82c571 URL: https://github.com/llvm/llvm-project/commit/56ab966a04dd22570fcb18276e2409c94e82c571 DIFF: https://github.com/llvm/llvm-project/commit/56ab966a04dd22570fcb18276e2409c94e82c571.diff

[clang] e22b02d - [Clang][Docs] Document the clang-offload-packager better

2022-05-31 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-31T11:53:27-04:00 New Revision: e22b02d9b4f8bb968628ac7cf2d9a42bf13e2898 URL: https://github.com/llvm/llvm-project/commit/e22b02d9b4f8bb968628ac7cf2d9a42bf13e2898 DIFF: https://github.com/llvm/llvm-project/commit/e22b02d9b4f8bb968628ac7cf2d9a42bf13e2898.diff

[clang] 259a9df - [Clang][Docs] Fix typo in offload packager reference

2022-05-31 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-05-31T12:27:33-04:00 New Revision: 259a9df963ca5f28f325ed6f6bfe5da639c78cbf URL: https://github.com/llvm/llvm-project/commit/259a9df963ca5f28f325ed6f6bfe5da639c78cbf DIFF: https://github.com/llvm/llvm-project/commit/259a9df963ca5f28f325ed6f6bfe5da639c78cbf.diff

[clang] afd2f7e - [Binary] Promote OffloadBinary to inherit from Binary

2022-06-01 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-01T18:40:57-04:00 New Revision: afd2f7e9919737e30f9fae2d3cff892189301a55 URL: https://github.com/llvm/llvm-project/commit/afd2f7e9919737e30f9fae2d3cff892189301a55 DIFF: https://github.com/llvm/llvm-project/commit/afd2f7e9919737e30f9fae2d3cff892189301a55.diff

[clang] 1257fe1 - [Clang] Change the offload packager build to be a clang tool

2022-06-03 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-03T17:35:26-04:00 New Revision: 1257fe193a35b3b3ee8ccc5987f376b0b6dc21ea URL: https://github.com/llvm/llvm-project/commit/1257fe193a35b3b3ee8ccc5987f376b0b6dc21ea DIFF: https://github.com/llvm/llvm-project/commit/1257fe193a35b3b3ee8ccc5987f376b0b6dc21ea.diff

[clang] f06731e - [Binary] Make the OffloadingImage type own the memory

2022-06-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-07T15:56:09-04:00 New Revision: f06731e3c367c481acc8bc6b1f8244039992fa65 URL: https://github.com/llvm/llvm-project/commit/f06731e3c367c481acc8bc6b1f8244039992fa65 DIFF: https://github.com/llvm/llvm-project/commit/f06731e3c367c481acc8bc6b1f8244039992fa65.diff

[clang] 1054a73 - [Clang] Change host/device only compilation to a driver mode

2022-06-13 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-13T11:33:54-04:00 New Revision: 1054a7318788beb99536d84b34f84fccf2289769 URL: https://github.com/llvm/llvm-project/commit/1054a7318788beb99536d84b34f84fccf2289769 DIFF: https://github.com/llvm/llvm-project/commit/1054a7318788beb99536d84b34f84fccf2289769.diff

[clang] 6a6484c - [OpenMP] Fix offload packager not writing to temps correctly

2022-06-14 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-14T09:16:28-04:00 New Revision: 6a6484c666ed037f20126c4275e70b02807e09f8 URL: https://github.com/llvm/llvm-project/commit/6a6484c666ed037f20126c4275e70b02807e09f8 DIFF: https://github.com/llvm/llvm-project/commit/6a6484c666ed037f20126c4275e70b02807e09f8.diff

[clang] c4a2674 - [Clang] Simplify unifying target features

2022-06-14 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-14T15:58:16-04:00 New Revision: c4a2674e21c4f5ffd46f90982ce3c3d952018e66 URL: https://github.com/llvm/llvm-project/commit/c4a2674e21c4f5ffd46f90982ce3c3d952018e66 DIFF: https://github.com/llvm/llvm-project/commit/c4a2674e21c4f5ffd46f90982ce3c3d952018e66.diff

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Thanks, I noticed that spurious failure as well but didn't know what caused it. https://github.com/llvm/llvm-project/pull/74504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-12-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Ping https://github.com/llvm/llvm-project/pull/73177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/72280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/73177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I got this fail just now after doing a pull. ``` FAIL: Clang :: Driver/hip-offload-compress-zstd.hip (477 of 1078) TEST 'Clang :: Driver/hip-offload-compress-zstd.hip' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 7: rm -rf

[clang] bfd41c3 - [LinkerWrapper][Obvious] Fix missing use of texture data type

2023-12-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-12-07T16:55:14-06:00 New Revision: bfd41c3f8cc70bd65461a6d767f55c14d72150d9 URL: https://github.com/llvm/llvm-project/commit/bfd41c3f8cc70bd65461a6d767f55c14d72150d9 DIFF: https://github.com/llvm/llvm-project/commit/bfd41c3f8cc70bd65461a6d767f55c14d72150d9.diff

[clang] Fix tests hip-offload-compress-zlib/zstd.hip (PR #74783)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/74783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CUDA] Add support for CUDA-12.3 and sm_90a (PR #74895)

2023-12-08 Thread Joseph Huber via cfe-commits
@@ -80,8 +85,10 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo { bool allowFP16Math() const; bool hasMaskOperator() const { return PTXVersion >= 71; } bool hasNoReturn() const { return SmVersion >= 30 && PTXVersion >= 64; } - unsigned int getSmVersion() const { r

[llvm] [clang] [CUDA] Add support for CUDA-12.3 and sm_90a (PR #74895)

2023-12-08 Thread Joseph Huber via cfe-commits
@@ -80,8 +85,10 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo { bool allowFP16Math() const; bool hasMaskOperator() const { return PTXVersion >= 71; } bool hasNoReturn() const { return SmVersion >= 30 && PTXVersion >= 64; } - unsigned int getSmVersion() const { r

[clang] [llvm] [CUDA] Add support for CUDA-12.3 and sm_90a (PR #74895)

2023-12-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/74895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ef23bba - [Linkerwrapper] Make -Xoffload-linker pass directly to `clang`

2023-12-11 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-12-11T07:56:19-06:00 New Revision: ef23bba6e5aecbc6008e8a9ff8740fc4b04fe814 URL: https://github.com/llvm/llvm-project/commit/ef23bba6e5aecbc6008e8a9ff8740fc4b04fe814 DIFF: https://github.com/llvm/llvm-project/commit/ef23bba6e5aecbc6008e8a9ff8740fc4b04fe814.diff

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/72280 Summary: The standard GNU atomic operations are a very common way to target hardware atomics on the device. With more hetergenous devices being introduced, the concept of memory scopes has been in the LLVM languag

[clang] f3d5758 - [libc] Fix the wrapper headers for 'toupper' and 'tolower'

2023-11-14 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-11-14T11:52:43-06:00 New Revision: f3d57583b4942056a930b6f1e4101063637e9e98 URL: https://github.com/llvm/llvm-project/commit/f3d57583b4942056a930b6f1e4101063637e9e98 DIFF: https://github.com/llvm/llvm-project/commit/f3d57583b4942056a930b6f1e4101063637e9e98.diff

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-14 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Just a FYI, that recent NVIDIA GPUs have introduced a concept of [thread > block > cluster](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#thread-block-clusters). > We may need another level of granularity between the block and device. Should be easy enough,

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Is there any actual difference now between these and the HIP/OpenCL flavors > other than dropping the language from the name? Yes, these directly copy the GNU functions and names. The OpenCL / HIP ones use a different format. https://github.com/llvm/llvm-project/pull/72280 __

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -798,6 +798,13 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__ATOMIC_ACQ_REL", "4"); Builder.defineMacro("__ATOMIC_SEQ_CST", "5"); + // Define macros for the clang atomic scopes. + Builder.defineMacro("__MEMORY_SCOPE_SYSTEM", "

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -205,6 +220,56 @@ class AtomicScopeHIPModel : public AtomicScopeModel { } }; +/// Defines the generic atomic scope model. +class AtomicScopeGenericModel : public AtomicScopeModel { +public: + /// The enum values match predefined built-in macros __ATOMIC_SCOPE_*. + enum

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -54,6 +59,16 @@ enum class SyncScope { inline llvm::StringRef getAsString(SyncScope S) { jhuber6 wrote: I think it's because this is for AST printing purposes, while the backend strings vary per target. https://github.com/llvm/llvm-project/pull/72280

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
@@ -904,6 +904,32 @@ BUILTIN(__atomic_signal_fence, "vi", "n") BUILTIN(__atomic_always_lock_free, "bzvCD*", "nE") BUILTIN(__atomic_is_lock_free, "bzvCD*", "nE") +// GNU atomic builtins with atomic scopes. +ATOMIC_BUILTIN(__scoped_atomic_load, "v.", "t") jhuber

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Overall I think it is the right way to go. Memory scope has been used by > different offloading languages and the atomic clang builtins are essentially > the same. Adding a generic clang atomic builtins with memory scope allows > code sharing among offloading languages. I agr

[clang] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: This being in clang instead seems like a good change. Are there no CodeGen tests changed? We should add one if so. Probably just take your `libomptarget` test and run `update_cc_test_checks` on it with the arguments found in other test files. https://gi

[llvm] [clang] [LinkerWrapper] Support device binaries in multiple link jobs (PR #72442)

2023-11-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/72442 Summary: Currently the linker wrapper strictly assigns a single input binary to a single link job based off of its input architecture. This is not sufficient to implement the AMDGPU target ID correctly as this cou

[llvm] [clang] [LinkerWrapper] Support device binaries in multiple link jobs (PR #72442)

2023-11-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: The Windows builder gives the following error which I don't relieve on Linux. Does anyone have any clue what this `invalid argument` error could be caused by? ``` # note: command had no output on stdout or stderr # error: command failed with exit status: 1 # executed command: 'c:\

[llvm] [clang] [LinkerWrapper] Support device binaries in multiple link jobs (PR #72442)

2023-11-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > the error msg is not generated by offload wrapper itself, right? is it from > some program called by the offload wrapper? It may be caused by the `clang` invocation. Though I'm unsure why this change causes that test to fail. https://github.com/llvm/llvm-project/pull/72442 __

[llvm] [clang] [Offloading][NFC] Refactor handling of offloading entries (PR #72544)

2023-11-16 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/72544 Summary: This patch is a simple refactoring of code out of the linker wrapper into a common location. The main motivation behind this change is to make it easier to change the handling in the future to accept a tr

[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

2023-11-16 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/72554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

2023-11-16 Thread Joseph Huber via cfe-commits
@@ -2458,6 +2458,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, &getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad()) BuiltinID = mutateLongDoubleBuiltin(BuiltinID); + // Mutate the printf builtin ID so that we u

[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

2023-11-16 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Any tests? Can you explain why it's not sufficient to do this lowering in the AMDGPU pass? https://github.com/llvm/llvm-project/pull/72554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

2023-11-16 Thread Joseph Huber via cfe-commits
@@ -2458,6 +2458,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, &getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad()) BuiltinID = mutateLongDoubleBuiltin(BuiltinID); + // Mutate the printf builtin ID so that we u

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm a little wary of adding these without actually going through any sort of > standardization process; if other vendors don't support the same interface, > we just have more variations. (See also > https://clang.llvm.org/get_involved.html#criteria ) > > How consistent are th

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > I figured we can just treat these as clang extensions for the time being. > > We already have two variants that are more or less redundant for specific > > use-cases, (OpenCL and HIP), which should be able to be removed after this. > > I'm not sure what you mean here. If you

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > The underlying implementation is a string literal in the LLVM syncscope > > argument, but the problem is that this isn't standardized at all and varies > > between backends potentially > > We don't have to use the same set of strings as syncscope if that doesn't > make sens

[llvm] [clang] [Offloading][NFC] Refactor handling of offloading entries (PR #72544)

2023-11-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/72544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/72697 Summary: This patch provides the initial support to allow handling the new driver's offloading entries. Normally, the ELF target can emit varibles at C-identifier named sections and the linker will provide a point

[clang] [LinkerWrapper] Accenp some neede COFF linker argument (PR #72889)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/72889 Summary: The linker wrapper is a utility used to create offloading programs from single-source offloading languages such as OpenMP or CUDA. This is done by embedding device code into the host object, then feeding

[clang] 88b672b - [libc] Adjust headers for some implementations of 'stdio.h'

2023-11-20 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-11-20T11:22:59-06:00 New Revision: 88b672b0a79e9f68253abf7edcfa5a42d1321cae URL: https://github.com/llvm/llvm-project/commit/88b672b0a79e9f68253abf7edcfa5a42d1321cae DIFF: https://github.com/llvm/llvm-project/commit/88b672b0a79e9f68253abf7edcfa5a42d1321cae.diff

[clang] [LinkerWrapper] Accept some needed COFF linker arguments (PR #72889)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/72889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
@@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module &M, Constant *Addr, StringRef Name, M.getDataLayout().getDefaultGlobalsAddressSpace()); // The entry has to be created in the section the linker expects it to be. - Entry->setSection(SectionName); + if

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/72697 >From ef4e04961a1f553a9f1dced26e69e927060d4dd7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 17 Nov 2023 14:09:59 -0600 Subject: [PATCH] [Offload] Initial support for registering offloading entries on C

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
@@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module &M, Constant *Addr, StringRef Name, M.getDataLayout().getDefaultGlobalsAddressSpace()); // The entry has to be created in the section the linker expects it to be. - Entry->setSection(SectionName); + if

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/72697 >From e3b6ab18f390e0ee4938095717aa9e4b21690aa7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 17 Nov 2023 14:09:59 -0600 Subject: [PATCH] [Offload] Initial support for registering offloading entries on C

[clang] [llvm] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/72697 >From 4627ea74d753eb6742051127e0a5b0c64a620f20 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 17 Nov 2023 14:09:59 -0600 Subject: [PATCH] [Offload] Initial support for registering offloading entries on C

[llvm] [clang] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-20 Thread Joseph Huber via cfe-commits
@@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module &M, Constant *Addr, StringRef Name, M.getDataLayout().getDefaultGlobalsAddressSpace()); // The entry has to be created in the section the linker expects it to be. - Entry->setSection(SectionName); + if

[clang] [LinkerWrapper] Accept some needed COFF linker arguments (PR #72889)

2023-11-20 Thread Joseph Huber via cfe-commits
@@ -126,3 +126,8 @@ def version : Flag<["--", "-"], "version">, Flags<[HelpHidden]>, Alias; def whole_archive : Flag<["--", "-"], "whole-archive">, Flags<[HelpHidden]>; def no_whole_archive : Flag<["--", "-"], "no-whole-archive">, Flags<[HelpHidden]>; + +// COFF-style linker

[clang] [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (PR #72889)

2023-11-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/72889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (PR #72889)

2023-11-20 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The command-line argument handling is not related to > [PE](https://en.wikipedia.org/wiki/Portable_Executable)/COFF, but to > Microsoft's `link.exe` command line interface, for instance > [`/libpath:`](https://learn.microsoft.com/en-us/cpp/build/reference/libpath-additional-li

[clang] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-20 Thread Joseph Huber via cfe-commits
@@ -7731,10 +7731,30 @@ class MappableExprsHandler { IsImplicit, Mapper, VarRef, ForDeviceAddr); }; +// Sort all map clauses and make sure all the maps containing array +// sections are processed last. +llvm::SmallVector SortedMapClauses;

[clang] [llvm] [Offload] Initial support for registering offloading entries on COFF targets (PR #72697)

2023-11-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/72697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Joseph Huber via cfe-commits
@@ -7731,10 +7731,30 @@ class MappableExprsHandler { IsImplicit, Mapper, VarRef, ForDeviceAddr); }; +// Sort all map clauses and make sure all the maps containing array +// sections are processed last. +llvm::SmallVector SortedMapClauses;

[mlir] [lld] [clang] [llvm] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-21 Thread Joseph Huber via cfe-commits
@@ -88,7 +88,7 @@ class TargetOptions { COV_5 = 500, }; /// \brief Code object version for AMDGPU. - CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_None; + CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_5; j

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > We're already assigning names to the different scopes; we're just doing it in > the `__MEMORY_SCOPE_*` preprocessor macros. Replacing `_MEMORY_SCOPE_SYSTEM` > in the code with `"system"` doesn't really change the nature of how we assign > names to scopes. > > If these are sup

[clang] [lld] [mlir] [llvm] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Assuming all the tests pass, this LG and has been a long time coming. Thanks for working on this. https://github.com/llvm/llvm-project/pull/73000 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2023-11-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/73030 Summary: We support standalone compilation for the NVPTX architecture using 'nvlink' as our linker. Because of the special handling required to transform input files to cubins, as nvlink expects for some reason, w

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2023-11-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I have a review up to change the issue I was observing in CMake when building the `libc` project https://github.com/llvm/llvm-project/pull/73030. That is required for this to work when compiling the test suite. https://github.com/llvm/llvm-project/pull/73030

[llvm] [lld] [mlir] [clang] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-21 Thread Joseph Huber via cfe-commits
@@ -75,8 +75,8 @@ bb.2: store volatile i32 0, ptr addrspace(1) undef ret void } -; DEFAULTSIZE: .amdhsa_private_segment_fixed_size 4112 -; DEFAULTSIZE: ; ScratchSize: 4112 +; DEFAULTSIZE: .amdhsa_private_segment_fixed_size 16 jhuber6 wrote: My understandin

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2023-11-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/73030 >From ee43e8f9ae90bcd70d46b17cfecb854711a4b1ce Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 21 Nov 2023 13:45:10 -0600 Subject: [PATCH] [Clang][NVPTX] Allow passing arguments to the linker while standa

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Missing change to clang/docs/LanguageExtensions.rst describing the new > builtins. > Will do. > Are there any other projects that we might want to coordinate with here? gcc, > maybe? Unknown, I've never collaborated with anyone outside of LLVM. I know they have handling of G

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -3086,10 +3139,14 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice, // Only COV5 implicitargs needs to be set. COV4 implicitargs are not used. if (getImplicitArgsSize() == sizeof(utils::AMDGPUImplicitArgsTy)) { ImplArgs->BlockCountX = NumBlocks; +

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -17468,19 +17468,19 @@ Value *EmitAMDGPUImplicitArgPtr(CodeGenFunction &CGF) { /// Emit code based on Code Object ABI version. /// COV_4: Emit code to use dispatch ptr /// COV_5: Emit code to use implicitarg ptr -/// COV_NONE : Emit code to load a global variable "l

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -88,7 +88,7 @@ class TargetOptions { COV_5 = 500, }; /// \brief Code object version for AMDGPU. - CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_None; + CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_4; j

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/71234 ___ 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 Joseph Huber via cfe-commits
https://github.com/jhuber6 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 Joseph Huber 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 pre-optimization

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

2023-11-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Some comments. I remember there was a reason we couldn't use the existing linking support and needed the new pass, what was that again? https://github.com/llvm/llvm-project/pull/69371 ___ cfe-commits mailing list

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

2023-11-06 Thread Joseph Huber 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 pre-optimization

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

2023-11-06 Thread Joseph Huber via cfe-commits
@@ -45,7 +46,8 @@ namespace clang { const TargetOptions &TOpts, const LangOptions &LOpts, StringRef TDesc, llvm::Module *M, BackendAction Action, llvm::IntrusiveRefCntPtr VFS, -

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

2023-11-06 Thread Joseph Huber 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 DEBUG_T

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

2023-11-06 Thread Joseph Huber via cfe-commits
@@ -155,10 +162,10 @@ class EmitAssemblyHelper { return F; } - void - RunOptimizationPipeline(BackendAction Action, + void RunOptimizationPipeline(BackendAction Action, std::unique_ptr &OS, - std::unique_ptr &ThinLin

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

2023-11-06 Thread Joseph Huber 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: Apa

<    1   2   3   4   5   6   7   8   9   10   >