[clang] [OpenMP] Support for `nothing` in `metadirective` (PR #73690)

2023-11-28 Thread Deepak Eachempati via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} dreachem wrote: @alexey-bataev That restriction shouldn't apply to the `nothing` directive. The `nothing` directive is not execu

[clang] [OpenMP] Support for `nothing` in `metadirective` (PR #73690)

2023-11-28 Thread Deepak Eachempati via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} dreachem wrote: As I understand it, the `nothing` directive is not the equivalent of a null statement. It is an "ignore me" direc

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-14 Thread Deepak Eachempati via cfe-commits
@@ -208,4 +209,39 @@ int main(int argc, char **argv) { extern template int S::TS; extern template long S::TS; +// DUMP-LABEL: FunctionDecl {{.*}} implicit_firstprivate +void +implicit_firstprivate() { + +#pragma omp parallel num_threads(1) + { +int i = 0; +// DUMP: O

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-16 Thread Deepak Eachempati via cfe-commits
https://github.com/dreachem approved this pull request. https://github.com/llvm/llvm-project/pull/92055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-03-27 Thread Deepak Eachempati via cfe-commits
dreachem wrote: @alexey-bataev For something like this: ```c++ void f() { #pragma omp dispatch nowait depend(inout:x) g(); } ``` The AST dump for that function is as follows, with @SunilKuravinakop's patch: ``` `-FunctionDecl 0xed2dac8 line:7:6 f 'void ()' `-CompoundStmt 0xed2df28

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-10 Thread Deepak Eachempati via cfe-commits
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error< "'%0' clause requires 'dispatch' context selector">; def err_omp_append_args_with_varargs : Error< "'append_args' is not allowed with varargs functions">; +def warn_omp_dispatch_clause_novariant

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-05-07 Thread Deepak Eachempati via cfe-commits
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, DestructorsFlag = 0x8, PriorityFlag = 0x20, DetachableFlag = 0x40, +PoolFlag = 0x80, dreachem wrote: For the runtime change in this PR, is it suffici

[clang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-05-07 Thread Deepak Eachempati via cfe-commits
@@ -236,6 +236,8 @@ enum class OpenMPOffloadMappingFlags : uint64_t { // dynamic. // This is an OpenMP extension for the sake of OpenACC support. OMP_MAP_OMPX_HOLD = 0x2000, + /// Self directs mapping without creating a separate device copy. + OMP_MAP_SELF = 0x4000, ---

[clang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-05-07 Thread Deepak Eachempati via cfe-commits
@@ -9820,7 +9822,8 @@ void CGOpenMPRuntime::adjustTargetSpecificDataForLambdas( void CGOpenMPRuntime::processRequiresDirective(const OMPRequiresDecl *D) { for (const OMPClause *Clause : D->clauselists()) { -if (Clause->getClauseKind() == OMPC_unified_shared_memory) { +

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-05-06 Thread Deepak Eachempati via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa