@@ -0,0 +1,37 @@
+// RUN: %libomptarget-compilexx-run-and-check-generic
+
+// REQUIRES: libc
+
+#include
+
+#pragma omp begin declare target device_type(nohost)
+
+// CHECK: void ctor1()
+// CHECK: void ctor2()
+// CHECK: void ctor3()
+[[gnu::constructor(101)]] void ctor1() {
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/71739
>From 45a645c4e65d3b1f98dee23c2eba1cf6db99bff0 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 7 Nov 2023 17:12:31 -0600
Subject: [PATCH 1/2] [OpenMP] Rework handling of global ctor/dtors in OpenMP
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 2984156fd34a6969c7461b228d90b72711e3797c
0f184906bc8ceeaefe724847d4256c0c285bb3e2 --
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/71739
>From 45a645c4e65d3b1f98dee23c2eba1cf6db99bff0 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 7 Nov 2023 17:12:31 -0600
Subject: [PATCH 1/2] [OpenMP] Rework handling of global ctor/dtors in OpenMP
https://github.com/jhuber6 updated
https://github.com/llvm/llvm-project/pull/71739
>From c3df637dd2cb9a5210cb90a3bb69a63c31236039 Mon Sep 17 00:00:00 2001
From: Joseph Huber
Date: Tue, 7 Nov 2023 17:12:31 -0600
Subject: [PATCH] [OpenMP] Rework handling of global ctor/dtors in OpenMP
Summary:
jhuber6 wrote:
Just noticed I'm actually calling the destructors backwards in AMDGPU. Will fix
that.
https://github.com/llvm/llvm-project/pull/71739
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -2794,6 +2794,14 @@ void ItaniumCXXABI::registerGlobalDtor(CodeGenFunction
, const VarDecl ,
if (D.isNoDestroy(CGM.getContext()))
return;
+ // OpenMP offloading supports C++ constructors and destructors but we do not
+ // always have 'atexit' available. Instead
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
@@ -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
+
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
@@ -95,7 +95,7 @@ using namespace llvm;
static cl::opt
LowerCtorDtor("nvptx-lower-global-ctor-dtor",
cl::desc("Lower GPU ctor / dtors to globals on the device."),
- cl::init(false), cl::Hidden);
+ cl::init(true),
https://github.com/jhuber6 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
13 matches
Mail list logo