@@ -607,15 +621,17 @@ class OpenMPIRBuilder {
/// Generator for '#omp barrier'
///
/// \param Loc The location where the barrier directive was encountered.
- /// \param DK The kind of directive that caused the barrier.
+ /// \param Kind The kind of directive that
@@ -34,38 +33,10 @@
#include
#include
-struct PluginManager;
-
-/// Plugin adaptors should be created via `PluginAdaptorTy::create` which will
-/// invoke the constructor and call `PluginAdaptorTy::init`. Eventual errors
are
-/// reported back to the caller, otherwise a
@@ -92,10 +65,10 @@ struct PluginManager {
std::make_unique(TgtBinDesc, TgtDeviceImage));
}
- /// Initialize as many devices as possible for this plugin adaptor. Devices
- /// that fail to initialize are ignored. Returns the offset the devices were
- ///
@@ -92,10 +65,10 @@ struct PluginManager {
std::make_unique(TgtBinDesc, TgtDeviceImage));
}
- /// Initialize as many devices as possible for this plugin adaptor. Devices
- /// that fail to initialize are ignored. Returns the offset the devices were
- ///
https://github.com/jdoerfert approved this pull request.
I left minor comments.
This LGTM, assuming it passes our tests.
https://github.com/llvm/llvm-project/pull/87009
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -3476,3 +3472,9 @@ void *AMDGPUDeviceTy::allocate(size_t Size, void *,
TargetAllocTy Kind) {
} // namespace target
} // namespace omp
} // namespace llvm
+
+extern "C" {
+llvm::omp::target::plugin::GenericPluginTy *createPlugin_amdgpu() {
jdoerfert wrote:
@@ -34,38 +33,10 @@
#include
#include
-struct PluginManager;
-
-/// Plugin adaptors should be created via `PluginAdaptorTy::create` which will
-/// invoke the constructor and call `PluginAdaptorTy::init`. Eventual errors
are
-/// reported back to the caller, otherwise a
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/87009
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
@@ -0,0 +1,1026 @@
+//===-- ExpandVariadicsPass.cpp *- 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:
https://github.com/jdoerfert commented:
I just read over this and left some comments.
https://github.com/llvm/llvm-project/pull/89007
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/89007
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2096,15 +2102,1408 @@ OpenMPIRBuilder::createSection(const
LocationDescription ,
/*IsCancellable*/ true);
}
-/// Create a function with a unique name and a "void (i8*, i8*)" signature in
-/// the given module and return it.
-Function
@@ -607,15 +621,17 @@ class OpenMPIRBuilder {
/// Generator for '#omp barrier'
///
/// \param Loc The location where the barrier directive was encountered.
- /// \param DK The kind of directive that caused the barrier.
+ /// \param Kind The kind of directive that
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/80343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -145,6 +145,8 @@ static bool
isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) {
}
#endif
+Function *GLOBAL_ReductionFunc = nullptr;
jdoerfert wrote:
We should (almost) never have globals flying around. What is going on here?
@@ -99,14 +100,20 @@ class OpenMPIRBuilderConfig {
/// expanded.
std::optional IsGPU;
- // Flag for specifying if offloading is mandatory.
+ /// Flag for specifying if LLVMUsed information should be emitted.
+ std::optional EmitLLVMUsed;
jdoerfert
https://github.com/jdoerfert commented:
This patch is huge, and just skimming over it shows various places that could
be split off, and others that should not make it to the review stage (commented
out code).
Please update.
https://github.com/llvm/llvm-project/pull/80343
https://github.com/jdoerfert approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/88398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
LG, I misread the existing code in clang.
https://github.com/llvm/llvm-project/pull/88398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert approved this pull request.
https://github.com/llvm/llvm-project/pull/87351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
FWIW, for OpenMP we only need to support the [[]] spelling in C++. The fact we
had everything else was a side-effect of the implementation, IIRC.
Thus, this should be fine for OpenMP.
https://github.com/llvm/llvm-project/pull/84934
https://github.com/jdoerfert approved this pull request.
https://github.com/llvm/llvm-project/pull/87108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1235,27 +1251,56 @@ class OpenMPIRBuilder {
getTargetEntryUniqueInfo(FileIdentifierInfoCallbackTy CallBack,
StringRef ParentName = "");
- /// Functions used to generate reductions. Such functions take two Values
- /// representing LHS and
@@ -607,15 +621,17 @@ class OpenMPIRBuilder {
/// Generator for '#omp barrier'
///
/// \param Loc The location where the barrier directive was encountered.
- /// \param DK The kind of directive that caused the barrier.
+ /// \param Kind The kind of directive that
https://github.com/jdoerfert commented:
Some comments inlined.
Do we support non trivial constructors for reduction variables?
Similarly, did we support user defined reductions?
If either questions is answered with yes, do we keep that support?
We might need to ask Alexey.
@@ -0,0 +1,1071 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex
"__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]"
"pl_cond[.].+[.|,]"
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/80343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1235,27 +1251,56 @@ class OpenMPIRBuilder {
getTargetEntryUniqueInfo(FileIdentifierInfoCallbackTy CallBack,
StringRef ParentName = "");
- /// Functions used to generate reductions. Such functions take two Values
- /// representing LHS and
https://github.com/jdoerfert approved this pull request.
LG.
https://github.com/llvm/llvm-project/pull/85363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
> The versioning is required to support use cases where code generated by an
> older compiler is linked with a newer runtime.
Is that supported?
https://github.com/llvm/llvm-project/pull/85363
___
cfe-commits mailing list
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
+
+void t1() __attribute__((llvm_fn_attr("custom_attr", "custom_value"),
llvm_fn_attr("second_attr", "second_value")));
+
+void t1()
+{
+}
+
+void t2();
+
+void t3() {
+ t2()
@@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type
*DstTy,
Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy,
bool OnlyIfReduced) {
+ // Skip cast if types are identical
jdoerfert wrote:
High level question:
Does this patch eliminate the variadic call edge, or, does it perform inlining
on very special variadic function definitions?
I thought the former but `isFunctionInlinable`, sufficiently confused me.
https://github.com/llvm/llvm-project/pull/81058
@@ -36,14 +36,14 @@ void test() {
// CHECK1-NEXT:[[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
// CHECK1-NEXT:[[DOTZERO_ADDR:%.*]] = alloca i32, align 4
// CHECK1-NEXT:[[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
-// CHECK1-NEXT:store ptr [[DYN_PTR]], ptr
https://github.com/jdoerfert commented:
So, just to double check. On the Clang side, all you did is move the codegen
and adapt it to work in the OMPIRBuilder, right? Expected outcome is the same,
modulo the two small changes.
https://github.com/llvm/llvm-project/pull/80343
@@ -2953,7 +2953,7 @@ int bar(int n){
// CHECK3-NEXT:[[TMP8:%.*]] = getelementptr inbounds
[[STRUCT__GLOBALIZED_LOCALS_TY_0:%.*]], ptr [[TMP4]], i32 [[TMP5]]
// CHECK3-NEXT:[[C:%.*]] = getelementptr inbounds
[[STRUCT__GLOBALIZED_LOCALS_TY_0]], ptr [[TMP8]], i32 0, i32
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/80343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/79231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/79314
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert commented:
Do we need two different linkages or could the COFF setting be used in both?
Can we have a test to show the merging works as expected?
https://github.com/llvm/llvm-project/pull/79231
___
cfe-commits mailing list
https://github.com/jdoerfert commented:
Test?
https://github.com/llvm/llvm-project/pull/79314
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
We are back to the duplication.
The attribute here, num-work-groups, exist in IR as:
NVPTX: minctasm -> min work groups
NVPTX: maxclusterrank -> max work groups
OpenMP: omp_target_num_teams -> right now exact = num work groups
@bader This is not the same as the intrinsics but
https://github.com/jdoerfert approved this pull request.
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
@@ -959,8 +959,12 @@ void CodeGenPGO::emitCounterIncrement(CGBuilderTy
, const Stmt *S,
unsigned Counter = (*RegionCounterMap)[S];
- llvm::Value *Args[] = {FuncNameVar,
- Builder.getInt64(FunctionHash),
+ // Make sure that pointer to global is
jdoerfert wrote:
Can you rebase this so we can merge it?
https://github.com/llvm/llvm-project/pull/70667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
> > ongoing effort to extends PGO instrumentation to GPU device code
>
> Is there a high level description for this effort and its goal? Traditional
> compiler PGO is mostly for profiling control-flow, but we don't usually have
> a lot of control flow for GPU kernels.
I am
https://github.com/jdoerfert approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/77003
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert approved this pull request.
I left one more comment. I think the new classes are clearly superior to the
pairs. I looked over the changes, nothing jumps out. LG
https://github.com/llvm/llvm-project/pull/76882
___
@@ -187,80 +187,132 @@ Value *lowerObjectSizeCall(
const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed,
SmallVectorImpl *InsertedInstructions = nullptr);
-using SizeOffsetType = std::pair;
+/// SizeOffsetType - A base template class for the object size
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/76882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jdoerfert wrote:
I see. FWIW "pGI_decl_tgt_ref_ptr" is really not a good name (not your fault).
https://github.com/llvm/llvm-project/pull/75467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
jdoerfert wrote:
I mean, the test shows device IR for two functions, doesn't it? I am not aware
that part is impacted by USM. Host globals/register functions are.
https://github.com/llvm/llvm-project/pull/75467
___
cfe-commits mailing list
jdoerfert wrote:
How do the IR checks verify the flag works?
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
https://github.com/jdoerfert commented:
Can we have tests for this? You can just check for the dump.
https://github.com/llvm/llvm-project/pull/76587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -428,13 +428,22 @@ std::string getPGOFuncNameVarName(StringRef FuncName,
return VarName;
}
+bool isGPUProfTarget(const Module ) {
+ const auto = M.getTargetTriple();
+ return triple.rfind("nvptx", 0) == 0 || triple.rfind("amdgcn", 0) == 0 ||
+
@@ -187,80 +187,147 @@ Value *lowerObjectSizeCall(
const TargetLibraryInfo *TLI, AAResults *AA, bool MustSucceed,
SmallVectorImpl *InsertedInstructions = nullptr);
-using SizeOffsetType = std::pair;
+/// SizeOffsetType - A base template class for the object size
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/76882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert commented:
Generally, getting rid of the pair is great.
I am unsure I understand why we do the base template rather than inheritance.
Where is the base template used? If we do inheritance we could avoid
duplicating of members and provide default impls that work
jdoerfert wrote:
Documentation missing as well.
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
jdoerfert wrote:
This fails for me on the host and the AMD GPU:
GPU:
# | :217:1: note: possible intended match here
# | dat.datum[dat.arr[0][0]] = 5
X86:
# | :134:1: note: possible intended match here
# | dat.datum[dat.arr[0][0]] = 5461
The location that is printed (datum[1]) is uninitialized.
https://github.com/jdoerfert approved this pull request.
LG. Please rebase and merge.
https://github.com/llvm/llvm-project/pull/68016
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert closed
https://github.com/llvm/llvm-project/pull/74520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/74520
>From f505868953d07125f67bcbb79be426a6deee1a13 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Tue, 5 Dec 2023 12:35:04 -0800
Subject: [PATCH 1/2] [OpenMP] Add extra flags to libomptarget and plugin
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/67467
>From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001
From: David Pizzuto
Date: Tue, 26 Sep 2023 10:45:42 -0700
Subject: [PATCH] [clang-tidy] Add bugprone-move-shared-pointer-contents check.
https://github.com/jdoerfert closed
https://github.com/llvm/llvm-project/pull/73864
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert closed
https://github.com/llvm/llvm-project/pull/73817
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/73817
>From ed1513641d575c4a2881613864c892aff7855a78 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Tue, 28 Nov 2023 18:51:23 -0800
Subject: [PATCH] [OpenMP][NFC] Separate OpenMP/OpenACC specific mapping
https://github.com/jdoerfert edited
https://github.com/llvm/llvm-project/pull/70612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14633,6 +14633,26 @@ StmtResult
Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef Clauses,
}
setFunctionHasBranchProtectedScope();
+ bool HasBareClause = false;
+ bool HasThreadLimitClause = false;
+ bool HasNumTeamsClause = false;
+ OMPClause *BareClause = nullptr;
https://github.com/jdoerfert approved this pull request.
LG, see the nit.
Also, add a runtime test with bare and verify we stick with values we otherwise
would not, e.g., 1 teams and 1024 threads.
https://github.com/llvm/llvm-project/pull/70612
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/73493
>From 3758290904571237c13ba23f2e3f65e58b6598aa Mon Sep 17 00:00:00 2001
From: Corentin Jabot
Date: Mon, 27 Nov 2023 10:48:13 +0100
Subject: [PATCH 1/2] [Clang] CWG2789 Overload resolution with implicit and
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/73552
>From cea177222b421c67dabbe9e267f8b9a4ead4d51e Mon Sep 17 00:00:00 2001
From: Nick Desaulniers
Date: Tue, 10 Jan 2023 17:42:18 -0800
Subject: [PATCH 01/15] [clang] report inlining decisions with
@@ -7742,15 +7744,42 @@ class MappableExprsHandler {
else if (C->getMapType() == OMPC_MAP_alloc)
Kind = Allocs;
const auto *EI = C->getVarRefs().begin();
- for (const auto L : C->component_lists()) {
-const Expr *E = (C->getMapLoc().isValid())
https://github.com/jdoerfert approved this pull request.
LG, two nits.
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
@@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module , 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
@@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module , 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
https://github.com/jdoerfert edited
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
Author: Johannes Doerfert
Date: 2023-11-10T14:34:46-08:00
New Revision: 7318fe633487f9b9187e18c7ebd4c6516ded9a22
URL:
https://github.com/llvm/llvm-project/commit/7318fe633487f9b9187e18c7ebd4c6516ded9a22
DIFF:
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -1038,6 +1048,100 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -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() {
@@ -2627,6 +2637,38 @@ struct AMDGPUDeviceTy : public GenericDeviceTy,
AMDGenericDeviceTy {
using AMDGPUEventRef = AMDGPUResourceRef;
using AMDGPUEventManagerTy = GenericDeviceResourceManagerTy;
+ /// Common method to invoke a single threaded constructor or destructor
+
https://github.com/jdoerfert approved this pull request.
LG, check my comments.
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
https://github.com/jdoerfert 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
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -313,12 +313,18 @@ static void
registerGlobalCtorsDtorsForImage(__tgt_bin_desc *Desc,
DP("Adding ctor " DPxMOD " to the pending list.\n",
DPxPTR(Entry->addr));
Device.PendingCtorsDtors[Desc].PendingCtors.push_back(Entry->addr);
+
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -1038,6 +1048,109 @@ struct CUDADeviceTy : public GenericDeviceTy {
using CUDAStreamManagerTy = GenericDeviceResourceManagerTy;
using CUDAEventManagerTy = GenericDeviceResourceManagerTy;
+ Error callGlobalCtorDtorCommon(GenericPluginTy , DeviceImageTy ,
+
@@ -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
+
Author: Johannes Doerfert
Date: 2023-11-06T11:50:41-08:00
New Revision: 921bd299134fbe17c676b2486af269e18281def4
URL:
https://github.com/llvm/llvm-project/commit/921bd299134fbe17c676b2486af269e18281def4
DIFF:
Author: Johannes Doerfert
Date: 2023-11-06T11:50:41-08:00
New Revision: abe71b77f9ac2fc689e899fa6aa2486120c53912
URL:
https://github.com/llvm/llvm-project/commit/abe71b77f9ac2fc689e899fa6aa2486120c53912
DIFF:
jdoerfert wrote:
> > I think if the issues with the original commit are resolved, this is good
> > to go.
> > Did you verify we can properly auto-generate files, e.g., in
> > llvm/test/Transforms/Attributor and clang/test/OpenMP?
>
> Ah no I did not, I'll do that on Monday.
I'd run
Author: Johannes Doerfert
Date: 2023-11-03T10:28:36-07:00
New Revision: d3e7a48cbde060a6dbc1edcb00f375fb2f9405dc
URL:
https://github.com/llvm/llvm-project/commit/d3e7a48cbde060a6dbc1edcb00f375fb2f9405dc
DIFF:
https://github.com/jdoerfert commented:
I think if the issues with the original commit are resolved, this is good to go.
Did you verify we can properly auto-generate files, e.g., in
llvm/test/Transforms/Attributor and clang/test/OpenMP?
https://github.com/llvm/llvm-project/pull/71171
1 - 100 of 310 matches
Mail list logo