[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-10-23 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %libomptarget-compile-generic -fprofile-instr-generate \ +// RUN: -Xclang "-fprofile-instrument=clang" +// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \ +// RUN: --check-prefix="CLANG-PGO" +// RUN: %libomptarget-compile-generic -fprofile

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-10-23 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %libomptarget-compile-generic -fprofile-instr-generate \ +// RUN: -Xclang "-fprofile-instrument=clang" +// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \ +// RUN: --check-prefix="CLANG-PGO" +// RUN: %libomptarget-compile-generic -fprofile

[clang] [AMDGPU] Correctly pass the target-id to `ld.lld` (PR #101037)

2024-07-29 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 approved this pull request. LG https://github.com/llvm/llvm-project/pull/101037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-07-01 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 closed https://github.com/llvm/llvm-project/pull/97065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-07-01 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > The code changes look good now, but I'd prefer to have a non-SPMD mode test > case. All good @shiltian ? The test you requested was added Friday. https://github.com/llvm/llvm-project/pull/97065 ___ cfe-commits mailing list cfe-commi

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > The code changes look good now, but I'd prefer to have a non-SPMD mode test > case. Done https://github.com/llvm/llvm-project/pull/97065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -0,0 +1,84 @@ +// clang-format off +// RUN: %libomptarget-compile-generic && %libomptarget-run-generic 2>&1 | %fcheck-generic +// clang-format on + +// UNSUPPORTED: aarch64-unknown-linux-gnu +// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO +// UNSUPPORTED: x86_64-pc-linux-gnu +/

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -0,0 +1,57 @@ +// clang-format off +// RUN: %libomptarget-compilexx-generic && %libomptarget-run-generic 2>&1 | %fcheck-generic +// clang-format on + +// UNSUPPORTED: aarch64-unknown-linux-gnu +// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO +// UNSUPPORTED: x86_64-pc-linux-gnu

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -3044,6 +3046,9 @@ void CodeGenFunction::EmitOMPForOuterLoop( OuterLoopArgs.DKind = LoopArgs.DKind; EmitOMPOuterLoop(DynamicOrOrdered, IsMonotonic, S, LoopScope, OuterLoopArgs, emitOMPLoopBodyWithStopPoint, CodeGenOrdered); + if (DynamicOrOrdered) { -

[clang-tools-extra] Revert: [clangd] Replace an include with a forward declaration (PR #97082)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 closed https://github.com/llvm/llvm-project/pull/97082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang-tools-extra] Revert: [clangd] Replace an include with a forward declaration (PR #97082)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/97082 >From beb28561c632a9c76412d78210f6c7cdcf50819a Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 28 Jun 2024 12:37:31 -0400 Subject: [PATCH] Revert: [clangd] Replace an include with a forward declaration -

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: Yes of course: ``` cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=~/rocm/trunk_1.0 \ -DLLVM_ENABLE_PROJECTS="clang;lld;llvm;clang-tools-extra;compiler-rt;flang" \ -DLLVM_LIT_ARGS="-vv --show-unsupported --show-xfail -j 32" \ -DLLVM_TARGETS_TO_BUILD="X86;AMD

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: I'm building on an x86 + AMD GPU. What fails is this command: ``` [8/14] Performing build step for 'runtimes' [1/4] Linking CXX shared library /home/dobercea/upstream/llvm-project/build/lib/libomptarget.so.19.0git FAILED: /home/dobercea/upstream/llvm-project/build/lib/libomptarg

[clang-tools-extra] Revert: [clangd] Replace an include with a forward declaration (PR #97082)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/97082 >From beb28561c632a9c76412d78210f6c7cdcf50819a Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 28 Jun 2024 12:37:31 -0400 Subject: [PATCH] Revert: [clangd] Replace an include with a forward declaration -

[clang-tools-extra] Revert: [clangd] Replace an include with a forward declaration (PR #97082)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/97082 Reverting due to failures on several buildbots. >From beb28561c632a9c76412d78210f6c7cdcf50819a Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 28 Jun 2024 12:37:31 -0400 Subject: [PATCH] Revert: [clangd]

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: Should this be reverted? https://github.com/llvm/llvm-project/pull/76587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: This is failing for me: ``` ld.lld: error: undefined symbol: llvm::InstrProfSymtab::create(llvm::StringRef) >>> referenced by GlobalHandler.cpp >>> >>> GlobalHandler.cpp.o:(llvm::omp::target::plugin::GPUProfGlobals::dump() >>> const) in archive >>> /home/dobercea

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > Could you provide a more descriptive summary? > > I thought we discussed that the dynamic support would just use the static > scheduler, but this seems to implement it? I personally don't want to see > more things in the OpenMP runtime relying on `malloc` if we can avoid it.

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

2024-02-06 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -6106,6 +6106,8 @@ class OMPTeamsGenericLoopDirective final : public OMPLoopDirective { class OMPTargetTeamsGenericLoopDirective final : public OMPLoopDirective { friend class ASTStmtReader; friend class OMPExecutableDirective; + /// true if loop directive's associated

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

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

2024-01-09 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 approved this pull request. LG https://github.com/llvm/llvm-project/pull/71045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-19 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > The newly added test `offloading/struct_mapping_with_pointers.cpp` fails on > NVIDIA GPUs as well. > > ``` > TEST 'libomptarget :: nvptx64-nvidia-cuda :: > offloading/struct_mapping_with_pointers.cpp' FAILED > Exit Code: 1 > > Comman

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

2023-12-18 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 closed https://github.com/llvm/llvm-project/pull/72410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-18 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 closed https://github.com/llvm/llvm-project/pull/75642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: @alexey-bataev I have reworked the previous patch with your advice in mind. The emitCombinedEntry function was not changed since eliminating the combined entry has many ramifications which would need to be handled in a separate patch. For now this fixes the immediate error in a

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

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From 32454489d4e77f22ab935827dffe0febbb7b0626 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

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

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From e0e1f5e7bb2f95f2568b5dd647b883f4740bcafd Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

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

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From ae6cf04a149f00f52c1da8e7b9c1ca3af5393f99 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

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

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/75642 Fix mapping of structs to device. The following example fails: ``` #include #include struct Descriptor { int *datum; long int x; int xi; long int arr[1][30]; }; int main() { Descriptor dat = Descr

[clang] [openmp] [OpenMP][Fix] Fix test initializations (PR #74797)

2023-12-07 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 closed https://github.com/llvm/llvm-project/pull/74797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [OpenMP][Fix] Fix test initializations (PR #74797)

2023-12-07 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/74797 Make sure arrays used in test are properly initialized. >From 6712acd1175d1d6d55ce261651a543872a221c9a Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH 1/2] Fix o

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

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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;

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

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

2023-11-21 Thread Gheorghe-Teodor Bercea 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;

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

2023-11-20 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/72410 >From 6712acd1175d1d6d55ce261651a543872a221c9a Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH] Fix ordering when mapping a struct. --- clang/lib/CodeGen/CGOpen

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

2023-11-20 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/72410 >From 2ea93a7b4841671dc12ee39a25a66c536d92d83f Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH] Fix ordering when mapping a struct. --- clang/lib/CodeGen/CGOpen

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

2023-11-20 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/72410 >From d29229095203dccdee5ded18c0df0474e006ad53 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH] Fix ordering when mapping a struct. --- clang/lib/CodeGen/CGOpen

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > 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. Just added the test. http

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/72410 >From a16ffab67e8f8134fd943761da730c120bbae88d Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH] Fix ordering when mapping a struct. --- clang/lib/CodeGen/CGOpen

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > 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. No code gen test changes.

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/72410 >From ed9d50576cf167b4d9017e55333220d1601d088f Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 15 Nov 2023 11:07:09 -0500 Subject: [PATCH] Fix ordering when mapping a struct. --- clang/lib/CodeGen/CGOpen

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 edited https://github.com/llvm/llvm-project/pull/72410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/72410 Mapping a struct, if done in the wrong order, can overwrite the pointer attachment details. This fixes this problem. Original failing example: ``` #include #include struct Descriptor { int *datum; long

[libunwind] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. --- clan

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. --- clan

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. --- clan

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. --- clan

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,6 +486,29 @@ DeviceTy::getTgtPtrBegin(void *HstPtrBegin, int64_t Size, bool UpdateRefCount, LR.TPR.getEntry()->dynRefCountToStr().c_str(), DynRefCountAction, LR.TPR.getEntry()->holdRefCountToStr().c_str(), HoldRefCountAction); LR.TPR.TargetPointer

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-13 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. --- clan

r368491 - [OpenMP] Add support for close map modifier in Clang

2019-08-09 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Aug 9 14:42:13 2019 New Revision: 368491 URL: http://llvm.org/viewvc/llvm-project?rev=368491&view=rev Log: [OpenMP] Add support for close map modifier in Clang Summary: This patch adds support for the close map modifier in Clang. This ensures that the new map type is m

r367613 - [OpenMP] Fix declare target link implementation

2019-08-01 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Aug 1 14:15:58 2019 New Revision: 367613 URL: http://llvm.org/viewvc/llvm-project?rev=367613&view=rev Log: [OpenMP] Fix declare target link implementation Summary: This patch fixes the case where variables in different compilation units or the same compilation unit are

r363959 - [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-20 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Jun 20 11:04:47 2019 New Revision: 363959 URL: http://llvm.org/viewvc/llvm-project?rev=363959&view=rev Log: [OpenMP] Add support for handling declare target to clause when unified memory is required Summary: This patch adds support for the handling of the variables unde

r363809 - [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed Jun 19 07:26:43 2019 New Revision: 363809 URL: http://llvm.org/viewvc/llvm-project?rev=363809&view=rev Log: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC Summary: This patch strengthens the tests introduced in D63009 by: - addi

r363451 - [OpenMP] Add target task alloc function with device ID

2019-06-14 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Jun 14 13:19:54 2019 New Revision: 363451 URL: http://llvm.org/viewvc/llvm-project?rev=363451&view=rev Log: [OpenMP] Add target task alloc function with device ID Summary: Add a new call to Clang to perform task allocation for the target. Reviewers: ABataev, AlexEichenb

r363435 - [OpenMP] Avoid emitting maps for target link variables when unified memory is used

2019-06-14 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Jun 14 10:58:26 2019 New Revision: 363435 URL: http://llvm.org/viewvc/llvm-project?rev=363435&view=rev Log: [OpenMP] Avoid emitting maps for target link variables when unified memory is used Summary: This patch avoids the emission of maps for target link variables when

r361658 - [OpenMP] Add test for requires and unified shared memory clause with declare target link

2019-05-24 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri May 24 11:48:42 2019 New Revision: 361658 URL: http://llvm.org/viewvc/llvm-project?rev=361658&view=rev Log: [OpenMP] Add test for requires and unified shared memory clause with declare target link Summary: This patch adds a test for requires with unified share memory cl

r361298 - [OpenMP] Add support for registering requires directives with the runtime

2019-05-21 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Tue May 21 12:42:01 2019 New Revision: 361298 URL: http://llvm.org/viewvc/llvm-project?rev=361298&view=rev Log: [OpenMP] Add support for registering requires directives with the runtime Summary: This patch adds support for the registration of the requires directives with th

r361066 - [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri May 17 12:15:53 2019 New Revision: 361066 URL: http://llvm.org/viewvc/llvm-project?rev=361066&view=rev Log: [OpenMP][bugfix] Add missing math functions variants for log and abs. Summary: When including the random header in C++, some of the math functions it relies on ar

r360809 - [OpenMP][Bugfix] Move double and float versions of abs under c++ macro

2019-05-15 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed May 15 13:28:23 2019 New Revision: 360809 URL: http://llvm.org/viewvc/llvm-project?rev=360809&view=rev Log: [OpenMP][Bugfix] Move double and float versions of abs under c++ macro Summary: This is a fix for the reported bug: [[ https://bugs.llvm.org/show_bug.cgi?id=41861

r360804 - [OpenMP][bugfix] Fix issues with C++ 17 compilation when handling math functions

2019-05-15 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed May 15 13:18:21 2019 New Revision: 360804 URL: http://llvm.org/viewvc/llvm-project?rev=360804&view=rev Log: [OpenMP][bugfix] Fix issues with C++ 17 compilation when handling math functions Summary: In OpenMP device offloading we must ensure that unde C++ 17, the inclusi

r360626 - [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-13 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon May 13 15:11:44 2019 New Revision: 360626 URL: http://llvm.org/viewvc/llvm-project?rev=360626&view=rev Log: [OpenMP][Clang][BugFix] Split declares and math functions inclusion. Summary: This patches fixes an issue in which the __clang_cuda_cmath.h header is being includ

r360265 - [OpenMP][Clang] Support for target math functions

2019-05-08 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed May 8 08:52:33 2019 New Revision: 360265 URL: http://llvm.org/viewvc/llvm-project?rev=360265&view=rev Log: [OpenMP][Clang] Support for target math functions Summary: In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temp

r360063 - [OpenMP][Clang] Support for target math functions

2019-05-06 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon May 6 11:19:15 2019 New Revision: 360063 URL: http://llvm.org/viewvc/llvm-project?rev=360063&view=rev Log: [OpenMP][Clang] Support for target math functions Summary: In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temp

r359910 - [CUDA][Clang][Bugfix] Add missing CUDA 9.2 case

2019-05-03 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri May 3 10:59:18 2019 New Revision: 359910 URL: http://llvm.org/viewvc/llvm-project?rev=359910&view=rev Log: [CUDA][Clang][Bugfix] Add missing CUDA 9.2 case Summary: The bug was reported on the OpenMP-dev list: .../obj-release/lib/clang/9.0.0/include/__clang_cuda_intrins

r358711 - [OpenMP][NFC] Fix requires target test.

2019-04-18 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Apr 18 13:34:43 2019 New Revision: 358711 URL: http://llvm.org/viewvc/llvm-project?rev=358711&view=rev Log: [OpenMP][NFC] Fix requires target test. Summary: Fix requires target test. Reviewers: ABataev Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Diffe

r358709 - [OpenMP] Add checks for requires and target directives.

2019-04-18 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Apr 18 12:53:43 2019 New Revision: 358709 URL: http://llvm.org/viewvc/llvm-project?rev=358709&view=rev Log: [OpenMP] Add checks for requires and target directives. Summary: The requires directive containing target related clauses must appear before any target region in

r350759 - [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

2019-01-09 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed Jan 9 12:45:26 2019 New Revision: 350759 URL: http://llvm.org/viewvc/llvm-project?rev=350759&view=rev Log: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest. Summary: Change the strategy for computing loop index variables after collaps

r350758 - [OpenMP] Add flag for preventing the extension to 64 bits for the collapse loop counter

2019-01-09 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed Jan 9 12:38:35 2019 New Revision: 350758 URL: http://llvm.org/viewvc/llvm-project?rev=350758&view=rev Log: [OpenMP] Add flag for preventing the extension to 64 bits for the collapse loop counter Summary: Introduce a compiler flag for cases when the user knows that the

r347915 - [OpenMP] Add a new version of the SPMD deinit kernel function

2018-11-29 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Nov 29 12:53:49 2018 New Revision: 347915 URL: http://llvm.org/viewvc/llvm-project?rev=347915&view=rev Log: [OpenMP] Add a new version of the SPMD deinit kernel function Summary: This patch adds a new runtime for the SPMD deinit kernel function which replaces the previo

r345527 - [OpenMP] Fix condition.

2018-10-29 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Oct 29 12:44:25 2018 New Revision: 345527 URL: http://llvm.org/viewvc/llvm-project?rev=345527&view=rev Log: [OpenMP] Fix condition. Summary: Iteration variable must be strictly less than the number of iterations. This fixes a bug introduced by previous patch D53448. Re

r345509 - [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-29 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Oct 29 08:45:47 2018 New Revision: 345509 URL: http://llvm.org/viewvc/llvm-project?rev=345509&view=rev Log: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for Summary: This patch adds a new code generation path for bound sharing directive

r345507 - [OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases.

2018-10-29 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Oct 29 08:23:23 2018 New Revision: 345507 URL: http://llvm.org/viewvc/llvm-project?rev=345507&view=rev Log: [OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases. Summary: This patch enables the choosing of the default schedule for parallel for lo

r345417 - [NFC][OpenMP] Add new test for parallel for code generation.

2018-10-26 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Oct 26 11:59:52 2018 New Revision: 345417 URL: http://llvm.org/viewvc/llvm-project?rev=345417&view=rev Log: [NFC][OpenMP] Add new test for parallel for code generation. Summary: This is a simple test of the parallel for code generation. It will be used to showcase the c

r343260 - [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD mode achieve coalescing

2018-09-27 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Sep 27 13:29:00 2018 New Revision: 343260 URL: http://llvm.org/viewvc/llvm-project?rev=343260&view=rev Log: [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD mode achieve coalescing Summary: Set default schedule for parallel for loops to schedu

r343253 - [OpenMP] Make default distribute schedule for NVPTX target regions in SPMD mode achieve coalescing

2018-09-27 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Sep 27 12:22:56 2018 New Revision: 343253 URL: http://llvm.org/viewvc/llvm-project?rev=343253&view=rev Log: [OpenMP] Make default distribute schedule for NVPTX target regions in SPMD mode achieve coalescing Summary: For the OpenMP NVPTX toolchain choose a default distri

r340772 - [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading

2018-08-27 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Mon Aug 27 13:16:20 2018 New Revision: 340772 URL: http://llvm.org/viewvc/llvm-project?rev=340772&view=rev Log: [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloading Summary: When offloading to a device and using the powerpc64le version of the auxiliary triple, th

r337015 - [OpenMP] Initialize data sharing stack for SPMD case

2018-07-13 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Jul 13 09:18:24 2018 New Revision: 337015 URL: http://llvm.org/viewvc/llvm-project?rev=337015&view=rev Log: [OpenMP] Initialize data sharing stack for SPMD case Summary: In the SPMD case, we need to initialize the data sharing and globalization infrastructure. This cove

r328219 - [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side

2018-03-22 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Mar 22 10:33:27 2018 New Revision: 328219 URL: http://llvm.org/viewvc/llvm-project?rev=328219&view=rev Log: [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side Summary: The workers also need to initialize the global stack. The call t

r327513 - [OpenMP] Add OpenMP data sharing infrastructure using global memory

2018-03-14 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed Mar 14 07:17:45 2018 New Revision: 327513 URL: http://llvm.org/viewvc/llvm-project?rev=327513&view=rev Log: [OpenMP] Add OpenMP data sharing infrastructure using global memory Summary: This patch handles the Clang code generation phase for the OpenMP data sharing infras

r327460 - [OpenMP] Add flag for linking runtime bitcode library

2018-03-13 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Tue Mar 13 16:19:52 2018 New Revision: 327460 URL: http://llvm.org/viewvc/llvm-project?rev=327460&view=rev Log: [OpenMP] Add flag for linking runtime bitcode library Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime

r327447 - Revert revision 327438.

2018-03-13 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Tue Mar 13 13:50:12 2018 New Revision: 327447 URL: http://llvm.org/viewvc/llvm-project?rev=327447&view=rev Log: Revert revision 327438. Removed: cfe/trunk/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_20.bc Modified: cfe/trunk/include/clang/Basic/DiagnosticDr

r327438 - [OpenMP] Add flag for linking runtime bitcode library

2018-03-13 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Tue Mar 13 12:39:19 2018 New Revision: 327438 URL: http://llvm.org/viewvc/llvm-project?rev=327438&view=rev Log: [OpenMP] Add flag for linking runtime bitcode library Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime

  1   2   >