[clang] [Clang][OpenMP] Clang adding the addrSpace according to DataLayout fix (PR #65483)

2023-09-12 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I believe this broke one of the AMDGPU OpenMP buildbots https://lab.llvm.org/staging/#/builders/247/builds/6351 https://github.com/llvm/llvm-project/pull/65483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] AMDGPU: Duplicate instead of COPY constants from VGPR to SGPR (PR #66882)

2023-09-25 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Sure, I'll look into it later today and get back to you. https://github.com/llvm/llvm-project/pull/66882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AMDGPU: Duplicate instead of COPY constants from VGPR to SGPR (PR #66882)

2023-09-25 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: It appears that this change made the AMDGPU OpenMP buildbot unhappy https://lab.llvm.org/buildbot/#/builders/193/builds/39050 https://github.com/llvm/llvm-project/pull/66882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: It seems that this broke the AMDGPU OpenMP buildbot https://lab.llvm.org/buildbot/#/builders/193/builds/39393 I saw that you have since pushed up one patch regarding pointer compares. Are you looking at the remaining test fails as well?

[openmp] [llvm] [clang] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
@@ -2627,6 +2637,48 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy { using AMDGPUEventRef = AMDGPUResourceRef; using AMDGPUEventManagerTy = GenericDeviceResourceManagerTy; + /// Common method to invoke a single threaded constructor or destructor +

[llvm] [clang] [openmp] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
@@ -2627,6 +2637,48 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy { using AMDGPUEventRef = AMDGPUResourceRef; using AMDGPUEventManagerTy = GenericDeviceResourceManagerTy; + /// Common method to invoke a single threaded constructor or destructor +

[openmp] [llvm] [clang] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [llvm] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: I have only briefly looked at the NVPTX implementation. https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[openmp] [llvm] [clang] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [openmp] [clang] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: Thanks Joseph. Another two nits. https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
@@ -671,6 +671,20 @@ struct GenericDeviceTy : public DeviceAllocatorTy { Error synchronize(__tgt_async_info *AsyncInfo); virtual Error synchronizeImpl(__tgt_async_info ) = 0; + /// Invokes any global constructors on the device if present and is required + /// by the

[clang] [llvm] [openmp] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
@@ -671,6 +671,20 @@ struct GenericDeviceTy : public DeviceAllocatorTy { Error synchronize(__tgt_async_info *AsyncInfo); virtual Error synchronizeImpl(__tgt_async_info ) = 0; + /// Invokes any global constructors on the device if present and is required + /// by the

[clang] [llvm] [openmp] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-09 Thread Jan Patrick Lehr via cfe-commits
@@ -2627,6 +2637,48 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy { using AMDGPUEventRef = AMDGPUResourceRef; using AMDGPUEventManagerTy = GenericDeviceResourceManagerTy; + /// Common method to invoke a single threaded constructor or destructor +

[openmp] [clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-19 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: @carlobertolli can you have another look at the runtime test I added to see if that addresses your feedback? https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-22 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr closed https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: I looked at the changes and from the little I understand CMake they seem ok. I added one nit. Maybe @saiislam can have a look as well. https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing list

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
@@ -102,6 +80,121 @@ function(add_entrypoint_library target_name) list(APPEND all_deps ${entrypoint_target}) endforeach(dep) list(REMOVE_DUPLICATES all_deps) + set(${result} ${all_deps} PARENT_SCOPE) +endfunction() + +# A rule to build a library from a collection of

[clang-tools-extra] [clang] [llvm] [XCOFF] Add compiler version to an auxiliary symbol table entry (PR #80162)

2024-02-06 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: This introduced a spelling mistake that broke some builds. https://lab.llvm.org/buildbot/#/builders/193/builds/46220 https://github.com/llvm/llvm-project/pull/80162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[openmp] [clang] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-18 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: It appears that this patch made the buildbot unhappy (https://lab.llvm.org/buildbot/#/builders/193/builds/43948). Let me know if you need help with this. https://github.com/llvm/llvm-project/pull/75642 ___ cfe-commits mailing list

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/75467 This adds a basic test to check the correct generation of double indirect access to declare target globals in USM mode vs non-USM mode. I am a bit unhappy with the way this test is set up, but could not find a

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
@@ -3381,6 +3381,8 @@ def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm="> Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"],

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75468 >From 9809ba1ec31cb1a4a066f709ae8bd3e965e1 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Thu, 6 Jul 2023 16:47:21 -0400 Subject: [PATCH] [OpenMP] Introduce -fopenmp-force-usm flag The new flag implements

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/75468 The new flag implements logic to include `#pragma omp requires unified_shared_memory` in every translation unit. This enables a straightforward way to enable USM for an application without the need to modify

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75467 >From d3d073d7f57f2a5d06cd8c1de8c1503034af3b6b Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Wed, 12 Jul 2023 05:04:41 -0400 Subject: [PATCH] [OpenMP][USM] Adds test for -fopenmp-force-usm flag This adds a basic

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-14 Thread Jan Patrick Lehr via cfe-commits
@@ -129,6 +129,22 @@ AMDGPUOpenMPToolChain::GetCXXStdlibType(const ArgList ) const { void AMDGPUOpenMPToolChain::AddClangSystemIncludeArgs( const ArgList , ArgStringList ) const { HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); + +

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-15 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75468 >From 4ecd07d786a5a994b33b9177d4e21d839bfe3fc9 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Thu, 6 Jul 2023 16:47:21 -0400 Subject: [PATCH] [OpenMP] Introduce -fopenmp-force-usm flag The new flag implements

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/75468 >From 8f381c760fca8a4abd7550c492ff22fa8972933a Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Thu, 6 Jul 2023 16:47:21 -0400 Subject: [PATCH 1/3] [OpenMP] Introduce -fopenmp-force-usm flag The new flag implements

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr closed https://github.com/llvm/llvm-project/pull/75468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I updated the feature PR (#75468) with a different solution. Will update the test after feedback if the route I took in the other PR is seen as OK. https://github.com/llvm/llvm-project/pull/75467 ___ cfe-commits mailing list

[clang] [OpenMP] Introduce -fopenmp-force-usm flag (PR #75468)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Hmm.. I guess I screwed something up with git and the history. https://github.com/llvm/llvm-project/pull/75468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/76571 This flag forces the compiler to generate code for OpenMP target regions as if the user specified the #pragma omp requires unified_shared_memory in each source file. The option does not have a -fno-* friend

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Is the approach taken in this approach acceptable as opposed to the header solution I put up earlier? https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2023-12-29 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: > > Is the approach taken in this approach acceptable as opposed to the header > > solution I put up earlier? > > Yes, it's pretty much exactly what I had in mind from my suggestion in the > last PR. Thanks. Perfect. I'll go ahead and add lit and runtime tests.

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/76571 >From bf25a538e7c020efde557b595eba64b804cbb817 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Fri, 29 Dec 2023 04:32:24 -0500 Subject: [PATCH 1/3] [OpenMP][USM] Introduces -fopenmp-force-usm flag This flag forces

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/76571 >From bf25a538e7c020efde557b595eba64b804cbb817 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Fri, 29 Dec 2023 04:32:24 -0500 Subject: [PATCH 1/4] [OpenMP][USM] Introduces -fopenmp-force-usm flag This flag forces

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: While I add some documentation, I'd appreciate feedback especially on the lit side of things. I would very much like to rename the pretty happy tripple-X workaround for substitution debugging into something sane. https://github.com/llvm/llvm-project/pull/76571

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Closing this. Test is now part of feature-PR. https://github.com/llvm/llvm-project/pull/75467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr closed https://github.com/llvm/llvm-project/pull/75467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-18 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/76571 >From bf25a538e7c020efde557b595eba64b804cbb817 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Fri, 29 Dec 2023 04:32:24 -0500 Subject: [PATCH 1/5] [OpenMP][USM] Introduces -fopenmp-force-usm flag This flag forces

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2024-01-04 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: The IR is impacted for the global that is in that test case. Lines ~46-50 (first IR section) vs line ~68 (second IR section). The remaining code is indeed the same. The way that this test is executed is out of date however, given that I have reimplemented the flag. My plan is to

[flang] [mlir] [clang] [Flang][OpenMP][MLIR] Add support for -nogpulib option (PR #71045)

2024-01-08 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: We have the buildbot now up in staging: https://lab.llvm.org/staging/#/builders/188 https://github.com/llvm/llvm-project/pull/71045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [openmp] [mlir] [clang] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-11-30 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: This was brought up and discussed in the weekly meeting. https://github.com/llvm/llvm-project/pull/70401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP] Fix runtime problem due to wrong map size. (PR #74692)

2023-12-07 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: The issue comes from the bot building without setting CMake option `-DLIBOMPTARGET_ENABLE_DEBUG=ON`. This makes the environment variable `LIBOMPTARGET_DEBUG=1` have no effect in the test, i.e., no output for FileCheck to test. https://github.com/llvm/llvm-project/pull/74692

[clang] [openmp] [OpenMP] Fix runtime problem due to wrong map size. (PR #74692)

2023-12-07 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I'm looking into it locally https://github.com/llvm/llvm-project/pull/74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [OpenMP] Fix runtime problem due to wrong map size. (PR #74692)

2023-12-07 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: It appears that this breaks the AMDGPU OpenMP Offload buildbot: https://lab.llvm.org/buildbot/#/builders/193/builds/43297 https://github.com/llvm/llvm-project/pull/74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-28 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Hi @aaupov I think this did break the AMD Hip build bot (another annotated builder). Are you looking into the potential issue? https://github.com/llvm/llvm-project/pull/69133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-19 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I just realized that I need to update the clang lit tests, so this is *not ready to land*, but I don't see a button to indicate that. https://github.com/llvm/llvm-project/pull/76571 ___ cfe-commits mailing list

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-19 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: > Automatic zero-copy doesn't work on some of the bbot's. I will have to land > this once the lit test harness extension in #77851 re-lands. Having your work landed would be very helpful indeed. https://github.com/llvm/llvm-project/pull/76571

[clang] [openmp] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-19 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/76571 >From 41b227e2c84b3c7eeedb6a9ebf559bec2c34aec3 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Fri, 29 Dec 2023 04:32:24 -0500 Subject: [PATCH] [OpenMP][USM] Introduces -fopenmp-force-usm flag This flag forces the

[openmp] [clang] [OpenMP][USM] Introduces -fopenmp-force-usm flag (PR #76571)

2024-01-20 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/76571 >From a6c437a52674613b90c451c2ed4105265f420a32 Mon Sep 17 00:00:00 2001 From: JP Lehr Date: Fri, 29 Dec 2023 04:32:24 -0500 Subject: [PATCH] [OpenMP][USM] Introduces -fopenmp-force-usm flag This flag forces the

[clang] [Clang] Append target search paths for direct offloading compilation (PR #82699)

2024-02-23 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr approved this pull request. LG https://github.com/llvm/llvm-project/pull/82699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Offload][NFC] Remove `omp_` prefix from offloading entries (PR #88071)

2024-04-09 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: Thank you for contributing this patch. I am by no means an expert in this area, but would like to see xray get support for shared libraries. I did an initial pass to simply look for easy things and left a few comments.

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
@@ -50,14 +52,72 @@ atomic_uint8_t XRayInitialized{0}; // This should always be updated before XRayInitialized is updated. SpinMutex XRayInstrMapMutex; -XRaySledMap XRayInstrMap; +// XRaySledMap XRayInstrMap; +// Contains maps for the main executable as well as DSOs. +//

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
@@ -111,6 +156,71 @@ void __xray_init() XRAY_NEVER_INSTRUMENT { #endif } +// Default visibility is hidden, so we have to explicitly make it visible to +// DSO. +SANITIZER_INTERFACE_ATTRIBUTE int32_t __xray_register_dso( +const XRaySledEntry *SledsBegin, const

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
@@ -50,14 +52,72 @@ atomic_uint8_t XRayInitialized{0}; // This should always be updated before XRayInitialized is updated. SpinMutex XRayInstrMapMutex; -XRaySledMap XRayInstrMap; +// XRaySledMap XRayInstrMap; +// Contains maps for the main executable as well as DSOs. +//

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
@@ -80,29 +140,14 @@ void __xray_init() XRAY_NEVER_INSTRUMENT { return; } - { -SpinMutexLock Guard(); -XRayInstrMap.Sleds = __start_xray_instr_map; -XRayInstrMap.Entries = __stop_xray_instr_map - __start_xray_instr_map; -if (__start_xray_fn_idx !=

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/90959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-05-03 Thread Jan Patrick Lehr via cfe-commits
@@ -111,6 +156,71 @@ void __xray_init() XRAY_NEVER_INSTRUMENT { #endif } +// Default visibility is hidden, so we have to explicitly make it visible to +// DSO. +SANITIZER_INTERFACE_ATTRIBUTE int32_t __xray_register_dso( +const XRaySledEntry *SledsBegin, const

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-25 Thread Jan Patrick Lehr via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: jplehr wrote: Hi, I think this one broke one of our buildbots: https://lab.llvm.org/buildbot/#/builders/259/builds/1769 I'm happy to help looking into it. https://github.com/llvm/llvm-project/pull/84461

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-25 Thread Jan Patrick Lehr via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: jplehr wrote: I see. Thanks for the explanation and the fix! Bot is back to green. https://github.com/llvm/llvm-project/pull/84461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-25 Thread Jan Patrick Lehr via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: jplehr wrote: Thanks! I am quite unfamiliar with that part of the code base and wonder if the symbol needs to just exist somewhere. The other thing used there (`InitializeNativeTargetAsmPrinter`) is declared in `TargetSelect.h`. So, does

[clang] [openmp] [Libomp] Place generated OpenMP headers into build resource directory (PR #88007)

2024-04-08 Thread Jan Patrick Lehr via cfe-commits
@@ -16,4 +16,12 @@ typedef unsigned __INTPTR_TYPE__ uintptr_t; #error Every target should have __INTPTR_TYPE__ #endif +#ifdef __INTPTR_MAX__ +#define INTPTR_MAX__INTPTR_MAX__ +#endif + +#ifdef __UINTPTR_MAX__ +#define UINTPTR_MAX __UINTPTR_MAX__ +#endif +

[clang] [openmp] [Libomp] Place generated OpenMP headers into build resource directory (PR #88007)

2024-04-08 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/88007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [Libomp] Place generated OpenMP headers into build resource directory (PR #88007)

2024-04-08 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: The changes seem reasonable to me. https://github.com/llvm/llvm-project/pull/88007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-10 Thread Jan Patrick Lehr via cfe-commits
@@ -1199,7 +1244,9 @@ llvm::Function *CGNVCUDARuntime::finalizeModule() { } return nullptr; } - if (CGM.getLangOpts().OffloadingNewDriver && RelocatableDeviceCode) + if (CGM.getLangOpts().OffloadViaLLVM) +createOffloadingEntries(); + else if

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-10 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Should the NFCI changes (like initializing struct fields) be put into a separate PR? https://github.com/llvm/llvm-project/pull/94549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-12 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I believe this broke our flang+openmp+offload bot: https://lab.llvm.org/staging/#/builders/140/builds/10168 Happy to help looking into it. https://github.com/llvm/llvm-project/pull/95126 ___ cfe-commits mailing list

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-12 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Thank you @nikic. I'll see to reproduce locally and narrow down as much as possible to provide small reproducer. https://github.com/llvm/llvm-project/pull/95126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org