diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h --- a/flang/include/flang/Parser/parse-tree.h +++ b/flang/include/flang/Parser/parse-tree.h @@ -3978,7 +3978,7 @@ u; }; -// Parse tree nodes for OpenACC 3.1 directives and clauses +// Parse tree nodes for OpenACC 3.3 directives and clauses struct AccObject { UNION_CLASS_BOILERPLATE(AccObject); @@ -4037,7 +4037,7 @@ std::tuple, AccObjectList> t; }; -// 2.5.13: + | * | max | min | iand | ior | ieor | .and. | .or. | .eqv. | .neqv. +// 2.5.15: + | * | max | min | iand | ior | ieor | .and. | .or. | .eqv. | .neqv. struct AccReductionOperator { ENUM_CLASS( Operator, Plus, Multiply, Max, Min, Iand, Ior, Ieor, And, Or, Eqv, Neqv) diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1022,7 +1022,7 @@ // Add predefinitions based on extensions enabled if (frontendOptions.features.IsEnabled( Fortran::common::LanguageFeature::OpenACC)) { - fortranOptions.predefinitions.emplace_back("_OPENACC", "202011"); + fortranOptions.predefinitions.emplace_back("_OPENACC", "202211"); } if (frontendOptions.features.IsEnabled( Fortran::common::LanguageFeature::OpenMP)) { diff --git a/flang/lib/Parser/openacc-parsers.cpp b/flang/lib/Parser/openacc-parsers.cpp --- a/flang/lib/Parser/openacc-parsers.cpp +++ b/flang/lib/Parser/openacc-parsers.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// Top-level grammar specification for OpenACC 3.1. +// Top-level grammar specification for OpenACC 3.3. #include "basic-parsers.h" #include "expr-parsers.h" @@ -40,12 +40,12 @@ TYPE_PARSER(construct( Parser{} / ":", Parser{})) -// 2.16.3 (2485) wait-argument is: +// 2.16 (3249) wait-argument is: // [devnum : int-expr :] [queues :] int-expr-list TYPE_PARSER(construct(maybe("DEVNUM:" >> scalarIntExpr / ":"), "QUEUES:" >> nonemptyList(scalarIntExpr) || nonemptyList(scalarIntExpr))) -// 2.9 (1609) size-expr is one of: +// 2.9 (1984-1986) size-expr is one of: // * (represented as an empty std::optional) // int-expr TYPE_PARSER(construct(scalarIntExpr) || @@ -66,7 +66,7 @@ "*" >> construct>())) TYPE_PARSER(construct(nonemptyList(Parser{}))) -// 2.9 gang-arg is one of : +// 2.9 (1979-1982) gang-arg is one of : // [num:]int-expr // dim:int-expr // static:size-expr @@ -85,7 +85,7 @@ TYPE_PARSER(construct( "FORCE:"_tok >> pure(true) || pure(false), scalarIntConstantExpr)) -// 2.5.13 Reduction +// 2.5.15 Reduction // Operator for reduction TYPE_PARSER(sourced(construct( first("+" >> pure(AccReductionOperator::Operator::Plus), @@ -104,7 +104,7 @@ TYPE_PARSER(sourced(construct(name)) || sourced(construct(scalarDefaultCharExpr))) -// 2.5.14 Default clause +// 2.5.16 Default clause TYPE_PARSER(construct( first("NONE" >> pure(llvm::acc::DefaultValue::ACC_Default_none), "PRESENT" >> pure(llvm::acc::DefaultValue::ACC_Default_present)))) diff --git a/flang/lib/Semantics/check-acc-structure.h b/flang/lib/Semantics/check-acc-structure.h --- a/flang/lib/Semantics/check-acc-structure.h +++ b/flang/lib/Semantics/check-acc-structure.h @@ -4,7 +4,7 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// OpenACC 3.1 structure validity check list +// OpenACC 3.3 structure validity check list // 1. invalid clauses on directive // 2. invalid repeated clauses on directive // 3. invalid nesting of regions diff --git a/flang/tools/bbc/bbc.cpp b/flang/tools/bbc/bbc.cpp --- a/flang/tools/bbc/bbc.cpp +++ b/flang/tools/bbc/bbc.cpp @@ -398,7 +398,7 @@ // enable parsing of OpenACC if (enableOpenACC) { options.features.Enable(Fortran::common::LanguageFeature::OpenACC); - options.predefinitions.emplace_back("_OPENACC", "202011"); + options.predefinitions.emplace_back("_OPENACC", "202211"); } Fortran::common::IntrinsicTypeDefaultKinds defaultKinds; diff --git a/llvm/include/llvm/Frontend/OpenACC/ACC.td b/llvm/include/llvm/Frontend/OpenACC/ACC.td --- a/llvm/include/llvm/Frontend/OpenACC/ACC.td +++ b/llvm/include/llvm/Frontend/OpenACC/ACC.td @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This is the definition file for OpenACC 3.1 directives and clauses. +// This is the definition file for OpenACC 3.3 directives and clauses. // //===----------------------------------------------------------------------===// @@ -64,6 +64,7 @@ let flangClass = "AccObjectList"; let aliases = ["present_or_copy", "pcopy"]; } + // 2.7.7 def ACCC_Copyin : Clause<"copyin"> { let flangClass = "AccObjectListWithModifier"; @@ -82,7 +83,7 @@ let aliases = ["present_or_create", "pcreate"]; } -// 2.5.15 +// 2.5.16 def ACC_Default_none : ClauseVal<"none", 1, 1> { let isDefault = 1; } def ACC_Default_present : ClauseVal<"present", 0, 1> {} @@ -140,7 +141,7 @@ // 2.6.6 def ACCC_Finalize : Clause<"finalize"> {} -// 2.5.13 +// 2.5.14 def ACCC_FirstPrivate : Clause<"firstprivate"> { let flangClass = "AccObjectList"; } @@ -156,7 +157,7 @@ let flangClass = "AccObjectList"; } -// 2.5.5 +// 2.5.6 def ACCC_If : Clause <"if"> { let flangClass = "ScalarLogicalExpr"; } @@ -180,13 +181,13 @@ // 2.15.1 def ACCC_NoHost : Clause<"nohost"> {} -// 2.5.9 +// 2.5.10 def ACCC_NumGangs : Clause<"num_gangs"> { let flangClass = "ScalarIntExpr"; let isValueList = 1; } -// 2.5.10 +// 2.5.11 def ACCC_NumWorkers : Clause<"num_workers"> { let flangClass = "ScalarIntExpr"; } @@ -196,7 +197,7 @@ let flangClass = "AccObjectList"; } -// 2.5.12 +// 2.5.13 def ACCC_Private : Clause<"private"> { let flangClass = "AccObjectList"; } @@ -214,12 +215,12 @@ // 2.12 def ACCC_Read : Clause<"read"> {} -// 2.5.14 +// 2.5.15 def ACCC_Reduction : Clause<"reduction"> { let flangClass = "AccObjectListWithReduction"; } -// 2.5.6 +// 2.5.7 def ACCC_Self : Clause<"self"> { let flangClass = "AccSelfClause"; let isValueOptional = true; @@ -235,7 +236,7 @@ let prefix = "length"; } -// 2.5.11 +// 2.5.12 def ACCC_VectorLength : Clause<"vector_length"> { let flangClass = "ScalarIntExpr"; } diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h --- a/mlir/include/mlir/Dialect/OpenACC/OpenACC.h +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACC.h @@ -38,7 +38,7 @@ namespace acc { /// Enumeration used to encode the execution mapping on a loop construct. -/// They refer directly to the OpenACC 3.1 standard: +/// They refer directly to the OpenACC 3.3 standard: /// 2.9.2. gang /// 2.9.3. worker /// 2.9.4. vector diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCBase.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCBase.td --- a/mlir/include/mlir/Dialect/OpenACC/OpenACCBase.td +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCBase.td @@ -21,7 +21,7 @@ let summary = "An OpenACC dialect for MLIR."; let description = [{ - This dialect models the construct from the OpenACC 3.1 directive language. + This dialect models the construct from the OpenACC 3.3 directive language. }]; let useDefaultAttributePrinterParser = 1;