r320590 - [OPENMP] Fix handling of clauses in clause parsing mode.

2017-12-13 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Dec 13 07:28:44 2017 New Revision: 320590 URL: http://llvm.org/viewvc/llvm-project?rev=320590&view=rev Log: [OPENMP] Fix handling of clauses in clause parsing mode. The compiler may generate incorrect code if we try to capture the variable in clause parsing mode. Modifi

r320596 - [OPENMP] Support `reduction` clause on target-based directives.

2017-12-13 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Dec 13 09:31:39 2017 New Revision: 320596 URL: http://llvm.org/viewvc/llvm-project?rev=320596&view=rev Log: [OPENMP] Support `reduction` clause on target-based directives. OpenMP 5.0 added support for `reduction` clause in target-based directives. Patch adds this support

r320613 - [OPENMP] Add codegen for `nowait` clause in target directives.

2017-12-13 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Dec 13 13:04:20 2017 New Revision: 320613 URL: http://llvm.org/viewvc/llvm-project?rev=320613&view=rev Log: [OPENMP] Add codegen for `nowait` clause in target directives. Added basic codegen for `nowait` clauses in target-based directives. Modified: cfe/trunk/includ

[clang] [Clang][OpenMP] fixed crash due to invalid binary expression in checking atomic semantics (PR #71480)

2023-11-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. Looks like correct fix to me. https://github.com/llvm/llvm-project/pull/71480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [openmp] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-11-07 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > This patch is now only for the front end. @shiltian @alexey-bataev, let us > know what you think about landing just this. We are going to push another PR > with the runtime changes, and that one will include numbers for performance. Not all my previous comments were addr

[openmp] [clang] [llvm] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-11-07 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > Sorry, @alexey-bataev, some were marked as resolved, and we did not see them. > > The wording on my previous question needed to be corrected, too. I did not > mean to ask if this is ready to land as is but instead if the division of the > original PR into just this front

[clang] [openmp] [llvm] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-11-07 Thread Alexey Bataev via cfe-commits
@@ -2516,6 +2549,24 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( StmtResult Directive = StmtError(); bool HasAssociatedStatement = true; + // Check if it is extension directive. + // Extension directives must have extension directives + // enabled

[openmp] [llvm] [clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-11-07 Thread Alexey Bataev via cfe-commits
@@ -178,6 +178,18 @@ struct PragmaOpenMPHandler : public PragmaHandler { Token &FirstToken) override; }; +struct PragmaNoOpenMPXHandler : public PragmaHandler { + PragmaNoOpenMPXHandler() : PragmaHandler("ompx") {} + void HandlePragma(Preprocessor &PP, Pr

[flang] [llvm] [lld] [libcxx] [lldb] [clang-tools-extra] [libc] [clang] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-07 Thread Alexey Bataev via cfe-commits
@@ -229,6 +230,9 @@ class Parser : public CodeCompletionHandler { /// Parsing OpenMP directive mode. bool OpenMPDirectiveParsing = false; + /// Parsing OpenACC directive mode. + bool OpenACCDirectiveParsing = false; alexey-bataev wrote: It is unused, ne

[lldb] [clang] [libc] [llvm] [clang-tools-extra] [libcxx] [lld] [flang] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-07 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang -S -### -fopenacc %s 2>&1 | FileCheck %s --check-prefix=CHECK-DRIVER +// CHECK-DRIVER: "-cc1" {{.*}} "-fopenacc" + +// RUN: %clang -S -### -fopenacc -fexperimental-openacc-macro-override=202211 %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACRO-OV

[clang] [Clang][OpenMP] Return empty QualType when a negative array was created (PR #71552)

2023-11-09 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/71552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -14633,6 +14633,26 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef Clauses, } setFunctionHasBranchProtectedScope(); + bool HasBareClause = false; + bool HasThreadLimitClause = false; + bool HasNumTeamsClause = false; + OMPClause *BareClause = nullptr;

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -14633,6 +14633,26 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef Clauses, } setFunctionHasBranchProtectedScope(); + bool HasBareClause = false; + bool HasThreadLimitClause = false; + bool HasNumTeamsClause = false; + OMPClause *BareClause = nullptr;

[flang] [llvm] [clang] [lld] [libcxx] [lldb] [clang-tools-extra] [libc] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -229,6 +230,9 @@ class Parser : public CodeCompletionHandler { /// Parsing OpenMP directive mode. bool OpenMPDirectiveParsing = false; + /// Parsing OpenACC directive mode. + bool OpenACCDirectiveParsing = false; alexey-bataev wrote: I mean, it has v

[flang] [llvm] [clang] [lld] [libcxx] [lldb] [clang-tools-extra] [libc] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -229,6 +230,9 @@ class Parser : public CodeCompletionHandler { /// Parsing OpenMP directive mode. bool OpenMPDirectiveParsing = false; + /// Parsing OpenACC directive mode. + bool OpenACCDirectiveParsing = false; alexey-bataev wrote: I think better t

[clang] [libc] [flang] [clang-tools-extra] [llvm] [libcxx] [lld] [lldb] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -1349,6 +1349,19 @@ def fno_hip_emit_relocatable : Flag<["-"], "fno-hip-emit-relocatable">, HelpText<"Do not override toolchain to compile HIP source to relocatable">; } +// Clang specific/exclusive options for OpenACC. +def openacc_macro_override alexey

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -14633,6 +14633,26 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef Clauses, } setFunctionHasBranchProtectedScope(); + bool HasBareClause = false; + bool HasThreadLimitClause = false; + bool HasNumTeamsClause = false; + OMPClause *BareClause = nullptr;

[flang] [lld] [libcxx] [clang] [libc] [lldb] [llvm] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -3633,6 +3633,22 @@ static void RenderHLSLOptions(const ArgList &Args, ArgStringList &CmdArgs, CmdArgs.push_back("-finclude-default-header"); } +static void RenderOpenACCOptions(const Driver &D, const ArgList &Args, + ArgStringList &CmdA

[flang] [llvm] [clang] [lld] [libcxx] [lldb] [clang-tools-extra] [libc] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
@@ -4001,6 +4008,14 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, (T.isNVPTX() || T.isAMDGCN()) && Args.hasArg(options::OPT_fopenmp_cuda_mode); + // OpenACC Configuration. + if (Args.hasArg(option

[flang] [lld] [libcxx] [clang] [libc] [lldb] [llvm] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-13 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/70234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Alexey Bataev via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Alexey Bataev via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

2023-12-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-07 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,23 @@ +// clang-format off +// RUN: %libomptarget-compilexx-generic && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-generic 2>&1 | %fcheck-generic +// clang-format on + +struct DataTy { + float a; + float b[2]; alexey-bataev wrote: Could you change th

[openmp] [clang] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: I think the description is not quite correct. Looks like %arrayidx is correct, but %2 is incorrect. https://github.com/llvm/llvm-project/pull/74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [openmp] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Alexey Bataev via cfe-commits
@@ -251,6 +254,67 @@ void ParseOpenACCClauseList(Parser &P) { } // namespace +/// OpenACC 3.3, section 2.16: +/// In this section and throughout the specification, the term wait-argument +/// means: +/// [ devnum : int-expr : ] [ queues : ] async-argument-list +bool Parser::P

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-11 Thread Alexey Bataev via cfe-commits
@@ -7485,6 +7485,99 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parllel for'. +class TeamsLoopCh

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

2023-12-11 Thread Alexey Bataev via cfe-commits
@@ -7485,6 +7485,99 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parllel for'. +class TeamsLoopCh

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

2023-11-15 Thread Alexey Bataev via cfe-commits
@@ -7485,6 +7485,99 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parllel for'. +class TeamsLoopCh

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

2023-11-15 Thread Alexey Bataev via cfe-commits
@@ -7485,6 +7485,99 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parllel for'. +class TeamsLoopCh

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

2023-11-15 Thread Alexey Bataev via cfe-commits
@@ -7485,6 +7485,99 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parllel for'. +class TeamsLoopCh

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,72 @@ +//===--- OpenACCKinds.h - OpenACC Enums -*- 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: Apa

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -3531,7 +3535,7 @@ class Parser : public CodeCompletionHandler { /// Placeholder for now, should just ignore the directives after emitting a /// diagnostic. Eventually will be split into a few functions to parse /// different situations. - DeclGroupPtrTy ParseOpenACCD

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[clang] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[llvm] [clang] [lldb] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[clang] [lldb] [llvm] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -10,18 +10,240 @@ // //===--===// +#include "clang/Basic/OpenACCKinds.h" #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" +#include "clang/Parse/RAIIObjectsForParser.h" +#include

[lldb] [clang] [llvm] [OpenACC] Implement initial parsing for Construct/Directive Names (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,72 @@ +//===--- OpenACCKinds.h - OpenACC Enums -*- 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: Apa

[lldb] [llvm] [clang] [OpenACC] Implement initial parsing for `parallel` construct (PR #72661)

2023-11-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/72661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -22,7 +22,9 @@ using namespace llvm; namespace { -// Translate single-token string representations to the OpenACC Directive Kind. +// This doesn't completely comprehend 'Compound Constructs' (as it just +// identifies the first token) just the first token of each. So +//

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -50,6 +52,35 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { if (DirKind == OpenACCDirectiveKind::Invalid) P.Diag(FirstTok, diag::err_acc_invalid_directive) << FirstTokSpelling; + // Combined Constructs allows parallel loop, serial loop, or kernels loo

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -22,7 +22,9 @@ using namespace llvm; namespace { -// Translate single-token string representations to the OpenACC Directive Kind. +// This doesn't completely comprehend 'Compound Constructs' (as it just +// identifies the first token) just the first token of each. So +//

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-17 Thread Alexey Bataev via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Need to add tests https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Alexey Bataev via cfe-commits
@@ -45,11 +47,36 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = GetOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement compound construct parsing (PR #72692)

2023-11-20 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/72692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-20 Thread Alexey Bataev via cfe-commits
@@ -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()) ?

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -91,10 +140,19 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = getOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

[clang] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -91,10 +140,19 @@ OpenACCDirectiveKind ParseOpenACCDirectiveKind(Parser &P) { P.ConsumeToken(); std::string FirstTokSpelling = P.getPreprocessor().getSpelling(FirstTok); - OpenACCDirectiveKind DirKind = getOpenACCDirectiveKind(FirstTokSpelling); + OpenACCDirectiveKind

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

2023-11-21 Thread Alexey Bataev 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] [OpenACC] Implement enter data/exit data construct parsing (PR #72916)

2023-11-21 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/72916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-21 Thread Alexey Bataev 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 Alexey Bataev 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 Alexey Bataev 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] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -94,6 +94,37 @@ void func() { #pragma acc kernels loop for(;;){} + int i = 0, j = 0, k = 0; + // expected-error@+2{{missing OpenACC 'atomic-clause'; expected 'read', 'write', 'update', or 'capture'}} + // expected-warning@+1{{OpenACC directives not yet implemented, pr

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -59,9 +60,21 @@ OpenACCDirectiveKindEx getOpenACCDirectiveKind(StringRef Name) { return llvm::StringSwitch(Name) .Case("enter", OpenACCDirectiveKindEx::Enter) .Case("exit", OpenACCDirectiveKindEx::Exit) + .Case("atomic", OpenACCDirectiveKindEx::Atomic)

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
@@ -143,26 +139,25 @@ ParseOpenACCEnterExitDataDirective(Parser &P, Token FirstTok, : OpenACCDirectiveKind::ExitData; } -OpenACCDirectiveKind ParseOpenACCAtomicDirective(Parser &P) { +OpenACCAtomicKind ParseOpenACCAtomicKind(Parser &P) { Token AtomicClauseToke

[clang] [OpenACC] Implement Atomic construct variants (PR #73015)

2023-11-21 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/73015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-21 Thread Alexey Bataev 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-22 Thread Alexey Bataev 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] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Alexey Bataev via cfe-commits
@@ -232,32 +235,87 @@ void ParseOpenACCClauseList(Parser &P) { P.Diag(P.getCurToken(), diag::warn_pragma_acc_unimplemented_clause_parsing); } -void ParseOpenACCDirective(Parser &P) { - OpenACCDirectiveKind DirKind = ParseOpenACCDirectiveKind(P); +} // namespace + +// Rou

[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-22 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/73143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-12-13 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Sorry, on a vacation, will review on Monday https://github.com/llvm/llvm-project/pull/68373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-12-18 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/68373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Add 'clause' parsing infrastructure plus a few clauses (PR #75052)

2023-12-18 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/75052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Add 'clause' parsing infrastructure plus a few clauses (PR #75052)

2023-12-18 Thread Alexey Bataev via cfe-commits
@@ -69,6 +69,19 @@ enum class OpenACCAtomicKind { Capture, Invalid, }; + +// Represents the kind of an OpenACC clause. alexey-bataev wrote: Use '///' kind of comment here https://github.com/llvm/llvm-project/pull/75052

[clang] [OpenACC] Add 'clause' parsing infrastructure plus a few clauses (PR #75052)

2023-12-18 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/75052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Add 'clause' parsing infrastructure plus a few clauses (PR #75052)

2023-12-18 Thread Alexey Bataev via cfe-commits
@@ -69,6 +69,19 @@ enum class OpenACCAtomicKind { Capture, Invalid, }; + +// Represents the kind of an OpenACC clause. +enum class OpenACCClauseKind { + Finalize, alexey-bataev wrote: Add the comments with the description of each clause kind? https://git

[clang] [OpenACC] Add 'clause' parsing infrastructure plus a few clauses (PR #75052)

2023-12-18 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: LG with nits https://github.com/llvm/llvm-project/pull/75052 ___ 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 Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. 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-tools-extra] [libc] [compiler-rt] [llvm] [clang] [mlir] [OpenMP] atomic compare fail : Codegen support (PR #75709)

2023-12-20 Thread Alexey Bataev via cfe-commits
@@ -6580,6 +6578,51 @@ void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) { } } + if (KindsEncountered.contains(OMPC_compare) && + KindsEncountered.contains(OMPC_fail)) { +Kind = OMPC_compare; +const OMPFailClause *fC = S.getSingleCl

[clang-tools-extra] [clang] [libc] [mlir] [llvm] [compiler-rt] [OpenMP] atomic compare fail : Codegen support (PR #75709)

2023-12-20 Thread Alexey Bataev via cfe-commits
@@ -6580,6 +6578,51 @@ void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) { } } + if (KindsEncountered.contains(OMPC_compare) && + KindsEncountered.contains(OMPC_fail)) { +Kind = OMPC_compare; +const OMPFailClause *fC = S.getSingleCl

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

2023-11-28 Thread Alexey Bataev via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} alexey-bataev wrote: I think this error message should remain https://github.com/llvm/llvm-project/pull/73690 ___

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

2023-11-28 Thread Alexey Bataev via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} alexey-bataev wrote: 3 Directive and Construct Syntax Neither a stand-alone directive nor a declarative directive may be used in

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

2023-11-28 Thread Alexey Bataev via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} alexey-bataev wrote: Seems to me, this should be allowed https://github.com/llvm/llvm-project/pull/73690

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

2023-11-28 Thread Alexey Bataev via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} alexey-bataev wrote: @dreachem The problem is, that the compiler has no idea what to do with this code. `nothing` has no associat

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

2023-11-28 Thread Alexey Bataev via cfe-commits
@@ -12,7 +12,6 @@ int mixed() { x=d; } -// expected-error@+2 {{#pragma omp nothing' cannot be an immediate substatement}} alexey-bataev wrote: Ah, ok, I see. Then yes, this check must be removed. https://github.com/llvm/llvm-project/pull/73690 ___

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

2023-11-28 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/73690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix accsessing "PresentModifierLocs" array beyond its end. (PR #73579)

2023-11-29 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/73579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP] return empty stmt for `nothing` (PR #74042)

2023-12-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix private variables registration in `simd` (PR #74105)

2023-12-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/74105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [compiler-rt] [libc] [mlir] [OpenMP] atomic compare fail : Codegen support (PR #75709)

2023-12-20 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/75709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-02 Thread Alexey Bataev 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

[clang] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-04 Thread Alexey Bataev via cfe-commits
@@ -5072,6 +5072,18 @@ static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, CurrentRegion != OMPD_cancellation_point && CurrentRegion != OMPD_cancel && CurrentRegion != OMPD_scan) return false; +// Checks needed for mapping "loop"

[clang] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-04 Thread Alexey Bataev via cfe-commits
@@ -11335,6 +11335,7 @@ class Sema final { /// on the parameter of the bind clause. In the methods for the /// mapped directives, check the parameters of the lastprivate clause. bool checkLastPrivateForMappedDirectives(ArrayRef Clauses); + alexey-bataev w

[clang] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-04 Thread Alexey Bataev via cfe-commits
@@ -6213,26 +6226,35 @@ StmtResult Sema::ActOnOpenMPExecutableDirective( OpenMPDirectiveKind PrevMappedDirective) { StmtResult Res = StmtError(); OpenMPBindClauseKind BindKind = OMPC_BIND_unknown; + llvm::SmallVector ClausesWithoutBind; + bool UseClausesWithoutBind =

[llvm] [libc] [mlir] [clang] [clang-tools-extra] [libcxxabi] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-04 Thread Alexey Bataev via cfe-commits
@@ -6124,35 +6136,36 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, bool Sema::mapLoopConstruct(llvm::SmallVector &ClausesWithoutBind, ArrayRef Clauses, -OpenMPBindClauseKind BindKind, +

[clang] [OpenACC] Implement 'default' clause parsing. (PR #77002)

2024-01-05 Thread Alexey Bataev via cfe-commits
@@ -90,9 +90,21 @@ enum class OpenACCClauseKind { Vector, // 'nohost' clause, allowed on 'routine' directives. NoHost, + // 'default' clause, allowed on parallel, serial, kernel (and compound) + // constructs. + Default, // Represents an invalid clause, for the purp

[clang] [OpenACC] Implement 'default' clause parsing. (PR #77002)

2024-01-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/77002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [libc] [flang] [llvm] [lldb] [mlir] [compiler-rt] [clang-tools-extra] [libcxx] [openmp] [clang] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-08 Thread Alexey Bataev via cfe-commits
@@ -6124,35 +6136,39 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, bool Sema::mapLoopConstruct(llvm::SmallVector &ClausesWithoutBind, ArrayRef Clauses, -OpenMPBindClauseKind BindKind, +

[libc] [clang-tools-extra] [openmp] [flang] [compiler-rt] [polly] [llvm] [libcxxabi] [mlir] [clang] [lldb] [libcxx] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/76938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   9   10   >