[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. The changes in this patch do not actually work correctly with kernels that really need to be in Generic mode. The ExecMode value recovered in the kmpc_kernel_init function is 3 in the case where it needs to be 1. The problem lies with the OpenMPOpt changes since

[PATCH] D154568: [Clang][OpenMP] GPU simd directive code generation

2023-07-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D154568#4528274 , @efwright wrote: > Dropping off a simple test case. If this looks about what you would expect > for the tests I have a couple more involved ones that I can repurpose and add > in. For more complex tests we

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 1370e568dea84c4ea65fe5c01ef4f4ccc751 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. @ABataev thank you for the review! I have now fixed the last nit and will commit the patch soon! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 ___ cfe-commits mailing

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537706. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537498. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:699-710 + /// Get call to __kmpc_alloc_shared + virtual std::pair + getKmpcAllocShared(CodeGenFunction , const VarDecl *VD) { +llvm_unreachable("not implemented"); + } + + /// Get call to

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { ABataev wrote: > ABataev wrote: > > 1. use

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537485. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537478. doru1004 marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In any case the patch is good to go. It no longer relies on VLA size checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 ___ cfe-commits mailing list

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. @ABataev This is as close as I could get it to what you wanted. I don't know how to get hold of the target directive so late in the emission process i.e. in markedAsEscaped function. The target directive doesn't get visited in the var checked for escaped vars so I

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536489. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ABataev wrote: > doru1004 wrote: > > doru1004 wrote:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + doru1004 wrote: > ABataev wrote: > > doru1004 wrote:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ABataev wrote: > doru1004 wrote: > > doru1004 wrote:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + doru1004 wrote: > doru1004 wrote: > > ABataev wrote:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + doru1004 wrote: > ABataev wrote: > > doru1004 wrote:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ABataev wrote: > doru1004 wrote: > > ABataev wrote: >

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536326. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ABataev wrote: > doru1004 wrote: > > ABataev wrote: >

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536322. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1606 +if (getLangOpts().OpenMPIsDevice) { + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { ABataev wrote: > No need

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536321. doru1004 marked 4 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ABataev wrote: > 1. Is it possible that

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 marked 3 inline comments as done. doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1609 +(CGM.getContext().getTargetInfo().getTriple().isAMDGPU() || + CGM.getContext().getTargetInfo().getTriple().isNVPTX())) { +

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536288. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1609 +(CGM.getContext().getTargetInfo().getTriple().isAMDGPU() || + CGM.getContext().getTargetInfo().getTriple().isNVPTX())) { + CGOpenMPRuntimeGPU = +

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. I have modified the patch to only do one thing rather than several things as the previous patch. Essentially this patch now only handles the delayed emission of the __kmpc_alloc_shared for the VLA which it could not emit in the Prolog of the function. This is now very

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-29 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 536059. doru1004 retitled this revision from "[Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions" to "[Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs ". doru1004 edited the summary of this

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1603 +// deallocation call of __kmpc_free_shared() is emitted later. +if (getLangOpts().OpenMP && getTarget().getTriple().isAMDGCN()) { + // Emit call to __kmpc_alloc_shared() instead of the

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1603 +// deallocation call of __kmpc_free_shared() is emitted later. +if (getLangOpts().OpenMP && getTarget().getTriple().isAMDGCN()) { + // Emit call to __kmpc_alloc_shared() instead of the

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 535186. doru1004 marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1085 } - for (const auto *VD : I->getSecond().EscapedVariableLengthDecls) { -// Use actual memory size of the VLA object including the padding doru1004 wrote: > ABataev

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1085 } - for (const auto *VD : I->getSecond().EscapedVariableLengthDecls) { -// Use actual memory size of the VLA object including the padding ABataev wrote: > jhuber6

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1085 } - for (const auto *VD : I->getSecond().EscapedVariableLengthDecls) { -// Use actual memory size of the VLA object including the padding ABataev wrote: > Why this

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ronlieb, gregrodgers, carlo.bertolli, arsenm, jdoerfert, dhruvachak, ABataev. doru1004 added a project: OpenMP. Herald added subscribers: sunshaoce, guansong, yaxunl, jvesely. Herald added a project: All. doru1004 requested review of this

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 1a58c3d601b4c982afeb714c3a6c4be4d787cbf1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148849/new/

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D148849#4285236 , @jdoerfert wrote: > Make a test for the attributor/openmp-opt, also don't use O2 > in tests, the IR only test is > sufficient. I removed the clang test since

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 515516. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148849/new/ https://reviews.llvm.org/D148849 Files: llvm/lib/Transforms/IPO/AttributorAttributes.cpp

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 01910787d386584ea5a3d5dc317a908423ba39ed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/ https://reviews.llvm.org/D147572

[PATCH] D148805: [Clang][OpenMP] Avoid emitting a __kmpc_alloc_shared for implicit casts which do not have their address taken

2023-04-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:448 return; -if (E->getCastKind() == CK_ArrayToPointerDecay) { - const bool SavedAllEscaped = AllEscaped; ABataev wrote: > I think you need to check that the

[PATCH] D148805: [Clang][OpenMP] Avoid emitting a __kmpc_alloc_shared for implicit casts which do not have their address taken

2023-04-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ronl, jdoerfert, jhuber6, carlo.bertolli, JonChesterfield, dhruvachak, gregrodgers, ABataev. doru1004 added a project: OpenMP. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. doru1004 requested review of

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/ https://reviews.llvm.org/D147572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 511444. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/ https://reviews.llvm.org/D147572 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/test/OpenMP/target_team_variable_codegen.cpp Index:

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 511436. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/ https://reviews.llvm.org/D147572 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/test/OpenMP/target_team_variable_codegen.cpp Index:

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33 +//. +// CHECK-NVIDIA: @local_a = internal addrspace(3) global [10 x i32] zeroinitializer, align 4 +//. jhuber6 wrote: > jdoerfert wrote: > > doru1004 wrote: > > >

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33 +//. +// CHECK-NVIDIA: @local_a = internal addrspace(3) global [10 x i32] zeroinitializer, align 4 +//. jhuber6 wrote: > Shouldn't the Nvidia version also be

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 510943. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/ https://reviews.llvm.org/D147572 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/test/OpenMP/target_team_variable_codegen.cpp

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:303 +if (GV->hasInitializer() && !(isa(GV->getInitializer()) || + isa(GV->getInitializer( { OutContext.reportError({}, arsenm

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 marked an inline comment as done. doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:3355 +llvm::GlobalValue::InternalLinkage, +CGM.getTriple().isAMDGCN() ? llvm::UndefValue::get(VarTy) +

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 510934. Herald added subscribers: llvm-commits, kosarev, foad, kerbowa, hiraditya, jvesely, arsenm. Herald added a project: LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147572/new/

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ronl, carlo.bertolli, jhuber6, jdoerfert, dhruvachak, gregrodgers. doru1004 added a project: OpenMP. Herald added subscribers: sunshaoce, nlopes, guansong, arichardson, yaxunl. Herald added a project: All. doru1004 requested review of this

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-23 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 0eabf59528f3c3f64923900cae740d9f26c45ae8 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 507485. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/declare_target_constexpr_codegen.cpp

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 507483. doru1004 added a comment. Updated lit test to show variable added to compiler used vars. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552 Files:

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-03-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 65a0d669b4625c34775436a6d3643d15bbc2465a Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144569/new/

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 507190. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/declare_target_constexpr_codegen.cpp

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 507114. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/declare_target_constexpr_codegen.cpp

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D146552#4210757 , @jhuber6 wrote: > We should have a clang test as well Agreed, working on one currently. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ronl, carlo.bertolli, jhuber6, jdoerfert, gregrodgers, dhruvachak. doru1004 added a project: OpenMP. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. doru1004 requested review of this revision. Herald

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-03-14 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 505157. Herald added a subscriber: sunshaoce. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144569/new/ https://reviews.llvm.org/D144569 Files: clang/lib/Sema/SemaOpenMP.cpp

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-02-24 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2274 + if (!IsByRef) { +if ((Ctx.getTargetInfo().getTriple().isAMDGCN()) || +(Ctx.getTargetInfo().getTriple().isNVPTX())) { jhuber6 wrote: > doru1004 wrote: > > jhuber6 wrote:

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-02-24 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2274 + if (!IsByRef) { +if ((Ctx.getTargetInfo().getTriple().isAMDGCN()) || +(Ctx.getTargetInfo().getTriple().isNVPTX())) { jhuber6 wrote: > Why does this handling need to be

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-02-22 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: jdoerfert, jhuber6, ronl, carlo.bertolli, arsenm, gregrodgers, ABataev. doru1004 added a project: OpenMP. Herald added subscribers: kosarev, kerbowa, guansong, yaxunl, jvesely. Herald added a project: All. doru1004 requested review of this

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 1407dbeabcfed114f0918b022365d03713dac028 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141528/new/ https://reviews.llvm.org/D141528

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-20 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit 49d47c4d2f280d15d1de94c53b72b6ab3c127b35 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 490659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5423-5426 + +/// Act on the iterator variable declaration. +ActOnOpenMPIteratorVarDecl(VD); + ABataev wrote: > Can we register this variable only in declare mapper context, i.e. add

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:22399-22412 bool Sema::isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const { assert(LangOpts.OpenMP && "Expected OpenMP mode."); const Expr *Ref = DSAStack->getDeclareMapperVarRef(); if

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > doru1004 wrote:

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > ABataev wrote: >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); ABataev wrote: > doru1004 wrote: >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > ABataev wrote: >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); ABataev wrote: > doru1004 wrote: >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); ABataev wrote: > doru1004 wrote: >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 490277. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/target_map_messages.cpp:970-979 + // ompx-error@+8 {{use of undeclared identifier 'itt'; did you mean 'it'?}} + // ompx-note@+7 {{'it' declared here}} + // omp-error@+6 {{use of undeclared identifier 'itt'; did you

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/target_map_messages.cpp:970-979 + // ompx-error@+8 {{use of undeclared identifier 'itt'; did you mean 'it'?}} + // ompx-note@+7 {{'it' declared here}} + // omp-error@+6 {{use of undeclared identifier 'itt'; did you

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 490188. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/include/clang/Parse/Parser.h:3474-3475 bool parseMapperModifier(Sema::OpenMPVarListDataTy ); + /// Parses the iterator modifier in map clause. + bool parseIteratorModifier(Sema::OpenMPVarListDataTy ); /// Parses

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 489942. doru1004 marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 489917. doru1004 marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 489787. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141871/new/ https://reviews.llvm.org/D141871 Files: clang/include/clang/AST/OpenMPClause.h clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: jdoerfert, ABataev, carlo.bertolli, ronl, gregrodgers, jhuber6. doru1004 added a project: OpenMP. Herald added subscribers: guansong, yaxunl. Herald added a project: All. doru1004 requested review of this revision. Herald added

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141528/new/ https://reviews.llvm.org/D141528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 489105. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141528/new/ https://reviews.llvm.org/D141528 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/nested_loop_codegen.cpp Index: clang/test/OpenMP/nested_loop_codegen.cpp

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 489035. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141528/new/ https://reviews.llvm.org/D141528 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/nested_loop_codegen.cpp Index: clang/test/OpenMP/nested_loop_codegen.cpp

[PATCH] D141528: [Clang][OpenMP] Fix loop directed nested inside a parallel

2023-01-11 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ronl, carlo.bertolli, ABataev, jdoerfert, jhuber6, gregrodgers. doru1004 added a project: OpenMP. Herald added subscribers: guansong, yaxunl. Herald added a project: All. doru1004 requested review of this revision. Herald added

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2023-01-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D140155#4016333 , @jhuber6 wrote: > In D140155#4016274 , @mgorny wrote: > >> In D140155#4004505 , @doru1004 >> wrote: >> >>> Commit

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2023-01-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D139723#4016685 , @mgorny wrote: > I've pushed a fix in dab67c66932b9149842f7c8431e951f952125fc0 > , based > on @jhuber6's fix from the other diff. Thank

[PATCH] D140295: [Fix][OpenMP] Fix commit for nohost variant.

2022-12-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit b5c809acd34c2489679300eb0b8a8b824aeb Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140295/new/

[PATCH] D140295: [Fix][OpenMP] Fix commit for nohost variant.

2022-12-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 created this revision. doru1004 added reviewers: ABataev, carlo.bertolli, ronl. doru1004 added a project: OpenMP. Herald added subscribers: guansong, yaxunl. Herald added a project: All. doru1004 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 07ff3c5ccce68aed6c1a270b3f89ea14de7aa250 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit 658ed9547cdd6657895339a6c390c31aa77a5698 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140155/new/

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483659. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_hip_runtime_wrapper.h

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {}

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {} ABataev

  1   2   3   4   5   6   7   >