[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
//===-- OMP.td - OpenMP directive definition file ----------*- tablegen -*-===//
|
|
|
|
//
|
|
|
|
// 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: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This is the definition file for OpenMP directives and clauses.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
include "llvm/Frontend/Directive/DirectiveBase.td"
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Definition of general OpenMP information
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def OpenMP : DirectiveLanguage {
|
|
|
|
let name = "OpenMP";
|
|
|
|
let cppNamespace = "omp"; // final namespace will be llvm::omp
|
|
|
|
let directivePrefix = "OMPD_";
|
|
|
|
let clausePrefix = "OMPC_";
|
2020-11-13 16:31:53 +01:00
|
|
|
let makeEnumAvailableInNamespace = true;
|
|
|
|
let enableBitmaskEnumInNamespace = true;
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let clauseEnumSetClass = "OmpClauseSet";
|
2020-08-11 16:43:56 +02:00
|
|
|
let flangClauseBaseClass = "OmpClause";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Definition of OpenMP clauses
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def OMPC_Allocator : Clause<"allocator"> {
|
|
|
|
let clangClass = "OMPAllocatorClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_If : Clause<"if"> {
|
|
|
|
let clangClass = "OMPIfClause";
|
|
|
|
let flangClass = "OmpIfClause";
|
|
|
|
}
|
|
|
|
def OMPC_Final : Clause<"final"> {
|
|
|
|
let clangClass = "OMPFinalClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarLogicalExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_NumThreads : Clause<"num_threads"> {
|
|
|
|
let clangClass = "OMPNumThreadsClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_SafeLen : Clause<"safelen"> {
|
|
|
|
let clangClass = "OMPSafelenClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntConstantExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_SimdLen : Clause<"simdlen"> {
|
|
|
|
let clangClass = "OMPSimdlenClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntConstantExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_Collapse : Clause<"collapse"> {
|
|
|
|
let clangClass = "OMPCollapseClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntConstantExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_Default : Clause<"default"> {
|
|
|
|
let clangClass = "OMPDefaultClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpDefaultClause";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_Private : Clause<"private"> {
|
|
|
|
let clangClass = "OMPPrivateClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2021-02-12 20:26:59 +01:00
|
|
|
def OMPC_Sizes: Clause<"sizes"> { let clangClass = "OMPSizesClause"; }
|
2021-06-10 21:24:17 +02:00
|
|
|
def OMPC_Full: Clause<"full"> { let clangClass = "OMPFullClause"; }
|
|
|
|
def OMPC_Partial: Clause<"partial"> { let clangClass = "OMPPartialClause"; }
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_FirstPrivate : Clause<"firstprivate"> {
|
|
|
|
let clangClass = "OMPFirstprivateClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_LastPrivate : Clause<"lastprivate"> {
|
|
|
|
let clangClass = "OMPLastprivateClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_Shared : Clause<"shared"> {
|
|
|
|
let clangClass = "OMPSharedClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Reduction : Clause<"reduction"> {
|
|
|
|
let clangClass = "OMPReductionClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpReductionClause";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_Linear : Clause<"linear"> {
|
|
|
|
let clangClass = "OMPLinearClause";
|
|
|
|
let flangClass = "OmpLinearClause";
|
|
|
|
}
|
|
|
|
def OMPC_Aligned : Clause<"aligned"> {
|
|
|
|
let clangClass = "OMPAlignedClause";
|
|
|
|
let flangClass = "OmpAlignedClause";
|
|
|
|
}
|
|
|
|
def OMPC_Copyin : Clause<"copyin"> {
|
|
|
|
let clangClass = "OMPCopyinClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_CopyPrivate : Clause<"copyprivate"> {
|
|
|
|
let clangClass = "OMPCopyprivateClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2020-07-22 18:28:04 +02:00
|
|
|
def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {}
|
|
|
|
def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {}
|
|
|
|
def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {}
|
2021-04-02 01:07:12 +02:00
|
|
|
def OMP_PROC_BIND_primary : ClauseVal<"primary",5,1> {}
|
|
|
|
def OMP_PROC_BIND_default : ClauseVal<"default",6,0> {}
|
|
|
|
def OMP_PROC_BIND_unknown : ClauseVal<"unknown",7,0> { let isDefault = true; }
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_ProcBind : Clause<"proc_bind"> {
|
|
|
|
let clangClass = "OMPProcBindClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpProcBindClause";
|
2020-07-22 18:28:04 +02:00
|
|
|
let enumClauseValue = "ProcBindKind";
|
|
|
|
let allowedClauseValues = [
|
2021-04-02 01:07:12 +02:00
|
|
|
OMP_PROC_BIND_primary,
|
2020-07-22 18:28:04 +02:00
|
|
|
OMP_PROC_BIND_master,
|
|
|
|
OMP_PROC_BIND_close,
|
|
|
|
OMP_PROC_BIND_spread,
|
|
|
|
OMP_PROC_BIND_default,
|
|
|
|
OMP_PROC_BIND_unknown
|
|
|
|
];
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
2020-11-16 14:39:11 +01:00
|
|
|
|
|
|
|
// static and auto are C++ keywords so need a capital to disambiguate.
|
|
|
|
def OMP_SCHEDULE_Static : ClauseVal<"Static", 2, 1> {}
|
|
|
|
def OMP_SCHEDULE_Dynamic : ClauseVal<"Dynamic", 3, 1> {}
|
|
|
|
def OMP_SCHEDULE_Guided : ClauseVal<"Guided", 4, 1> {}
|
|
|
|
def OMP_SCHEDULE_Auto : ClauseVal<"Auto", 5, 1> {}
|
|
|
|
def OMP_SCHEDULE_Runtime : ClauseVal<"Runtime", 6, 1> {}
|
|
|
|
def OMP_SCHEDULE_Default : ClauseVal<"Default", 7, 0> { let isDefault = 1; }
|
|
|
|
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Schedule : Clause<"schedule"> {
|
|
|
|
let clangClass = "OMPScheduleClause";
|
|
|
|
let flangClass = "OmpScheduleClause";
|
2020-11-16 14:39:11 +01:00
|
|
|
let enumClauseValue = "ScheduleKind";
|
|
|
|
let allowedClauseValues = [
|
|
|
|
OMP_SCHEDULE_Static,
|
|
|
|
OMP_SCHEDULE_Dynamic,
|
|
|
|
OMP_SCHEDULE_Guided,
|
|
|
|
OMP_SCHEDULE_Auto,
|
|
|
|
OMP_SCHEDULE_Runtime,
|
|
|
|
OMP_SCHEDULE_Default
|
|
|
|
];
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
2020-11-16 14:39:11 +01:00
|
|
|
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Ordered : Clause<"ordered"> {
|
|
|
|
let clangClass = "OMPOrderedClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntConstantExpr";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isValueOptional = true;
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_NoWait : Clause<"nowait"> {
|
|
|
|
let clangClass = "OMPNowaitClause";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Untied : Clause<"untied"> { let clangClass = "OMPUntiedClause"; }
|
|
|
|
def OMPC_Mergeable : Clause<"mergeable"> {
|
|
|
|
let clangClass = "OMPMergeableClause";
|
|
|
|
}
|
|
|
|
def OMPC_Read : Clause<"read"> { let clangClass = "OMPReadClause"; }
|
|
|
|
def OMPC_Write : Clause<"write"> { let clangClass = "OMPWriteClause"; }
|
|
|
|
def OMPC_Update : Clause<"update"> { let clangClass = "OMPUpdateClause"; }
|
|
|
|
def OMPC_Capture : Clause<"capture"> { let clangClass = "OMPCaptureClause"; }
|
|
|
|
def OMPC_SeqCst : Clause<"seq_cst"> { let clangClass = "OMPSeqCstClause"; }
|
|
|
|
def OMPC_AcqRel : Clause<"acq_rel"> { let clangClass = "OMPAcqRelClause"; }
|
|
|
|
def OMPC_Acquire : Clause<"acquire"> { let clangClass = "OMPAcquireClause"; }
|
|
|
|
def OMPC_Release : Clause<"release"> { let clangClass = "OMPReleaseClause"; }
|
|
|
|
def OMPC_Relaxed : Clause<"relaxed"> { let clangClass = "OMPRelaxedClause"; }
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Depend : Clause<"depend"> {
|
|
|
|
let clangClass = "OMPDependClause";
|
|
|
|
let flangClass = "OmpDependClause";
|
|
|
|
}
|
|
|
|
def OMPC_Device : Clause<"device"> {
|
|
|
|
let clangClass = "OMPDeviceClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_Threads : Clause<"threads"> { let clangClass = "OMPThreadsClause"; }
|
|
|
|
def OMPC_Simd : Clause<"simd"> { let clangClass = "OMPSIMDClause"; }
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Map : Clause<"map"> {
|
|
|
|
let clangClass = "OMPMapClause";
|
|
|
|
let flangClass = "OmpMapClause";
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_NumTeams : Clause<"num_teams"> {
|
|
|
|
let clangClass = "OMPNumTeamsClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_ThreadLimit : Clause<"thread_limit"> {
|
|
|
|
let clangClass = "OMPThreadLimitClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Priority : Clause<"priority"> {
|
|
|
|
let clangClass = "OMPPriorityClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_GrainSize : Clause<"grainsize"> {
|
|
|
|
let clangClass = "OMPGrainsizeClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_NoGroup : Clause<"nogroup"> {
|
|
|
|
let clangClass = "OMPNogroupClause";
|
|
|
|
}
|
|
|
|
def OMPC_NumTasks : Clause<"num_tasks"> {
|
|
|
|
let clangClass = "OMPNumTasksClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Hint : Clause<"hint"> {
|
|
|
|
let clangClass = "OMPHintClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ConstantExpr";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_DistSchedule : Clause<"dist_schedule"> {
|
|
|
|
let clangClass = "OMPDistScheduleClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "ScalarIntExpr";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isValueOptional = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_DefaultMap : Clause<"defaultmap"> {
|
|
|
|
let clangClass = "OMPDefaultmapClause";
|
2020-08-11 16:43:56 +02:00
|
|
|
let flangClass = "OmpDefaultmapClause";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_To : Clause<"to"> {
|
|
|
|
let clangClass = "OMPToClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
|
|
|
def OMPC_From : Clause<"from"> {
|
|
|
|
let clangClass = "OMPFromClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_UseDevicePtr : Clause<"use_device_ptr"> {
|
|
|
|
let clangClass = "OMPUseDevicePtrClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "Name";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isValueList = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_IsDevicePtr : Clause<"is_device_ptr"> {
|
|
|
|
let clangClass = "OMPIsDevicePtrClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "Name";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isValueList = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_TaskReduction : Clause<"task_reduction"> {
|
|
|
|
let clangClass = "OMPTaskReductionClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpReductionClause";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_InReduction : Clause<"in_reduction"> {
|
|
|
|
let clangClass = "OMPInReductionClause";
|
|
|
|
}
|
|
|
|
def OMPC_UnifiedAddress : Clause<"unified_address"> {
|
|
|
|
let clangClass = "OMPUnifiedAddressClause";
|
|
|
|
}
|
|
|
|
def OMPC_UnifiedSharedMemory : Clause<"unified_shared_memory"> {
|
|
|
|
let clangClass = "OMPUnifiedSharedMemoryClause";
|
|
|
|
}
|
|
|
|
def OMPC_ReverseOffload : Clause<"reverse_offload"> {
|
|
|
|
let clangClass = "OMPReverseOffloadClause";
|
|
|
|
}
|
|
|
|
def OMPC_DynamicAllocators : Clause<"dynamic_allocators"> {
|
|
|
|
let clangClass = "OMPDynamicAllocatorsClause";
|
|
|
|
}
|
|
|
|
def OMPC_AtomicDefaultMemOrder : Clause<"atomic_default_mem_order"> {
|
|
|
|
let clangClass = "OMPAtomicDefaultMemOrderClause";
|
|
|
|
}
|
|
|
|
def OMPC_Allocate : Clause<"allocate"> {
|
|
|
|
let clangClass = "OMPAllocateClause";
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpAllocateClause";
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_NonTemporal : Clause<"nontemporal"> {
|
|
|
|
let clangClass = "OMPNontemporalClause";
|
|
|
|
}
|
2020-11-16 14:39:11 +01:00
|
|
|
|
|
|
|
def OMP_ORDER_concurrent : ClauseVal<"default",2,0> { let isDefault = 1; }
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_Order : Clause<"order"> {
|
|
|
|
let clangClass = "OMPOrderClause";
|
2020-11-16 14:39:11 +01:00
|
|
|
let enumClauseValue = "OrderKind";
|
|
|
|
let allowedClauseValues = [
|
|
|
|
OMP_ORDER_concurrent
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2021-03-15 21:09:46 +01:00
|
|
|
def OMPC_Init : Clause<"init"> {
|
|
|
|
let clangClass = "OMPInitClause";
|
|
|
|
}
|
2021-03-17 21:04:08 +01:00
|
|
|
def OMPC_Use : Clause<"use"> {
|
|
|
|
let clangClass = "OMPUseClause";
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_Destroy : Clause<"destroy"> {
|
|
|
|
let clangClass = "OMPDestroyClause";
|
|
|
|
}
|
2021-03-31 21:26:47 +02:00
|
|
|
def OMPC_Novariants : Clause<"novariants"> {
|
|
|
|
let clangClass = "OMPNovariantsClause";
|
|
|
|
let flangClass = "ScalarLogicalExpr";
|
|
|
|
}
|
2021-04-03 20:09:25 +02:00
|
|
|
def OMPC_Nocontext : Clause<"nocontext"> {
|
|
|
|
let clangClass = "OMPNocontextClause";
|
|
|
|
let flangClass = "ScalarLogicalExpr";
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_Detach : Clause<"detach"> {
|
|
|
|
let clangClass = "OMPDetachClause";
|
|
|
|
}
|
|
|
|
def OMPC_Inclusive : Clause<"inclusive"> {
|
|
|
|
let clangClass = "OMPInclusiveClause";
|
|
|
|
}
|
|
|
|
def OMPC_Exclusive : Clause<"exclusive"> {
|
|
|
|
let clangClass = "OMPExclusiveClause";
|
|
|
|
}
|
|
|
|
def OMPC_UsesAllocators : Clause<"uses_allocators"> {
|
|
|
|
let clangClass = "OMPUsesAllocatorsClause";
|
|
|
|
}
|
|
|
|
def OMPC_Affinity : Clause<"affinity"> {
|
|
|
|
let clangClass = "OMPAffinityClause";
|
|
|
|
}
|
|
|
|
def OMPC_UseDeviceAddr : Clause<"use_device_addr"> {
|
|
|
|
let clangClass = "OMPUseDeviceAddrClause";
|
|
|
|
}
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Uniform : Clause<"uniform"> {
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "Name";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isValueList = true;
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMPC_DeviceType : Clause<"device_type"> {}
|
|
|
|
def OMPC_Match : Clause<"match"> {}
|
|
|
|
def OMPC_Depobj : Clause<"depobj"> {
|
|
|
|
let clangClass = "OMPDepobjClause";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isImplicit = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Flush : Clause<"flush"> {
|
|
|
|
let clangClass = "OMPFlushClause";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isImplicit = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_ThreadPrivate : Clause<"threadprivate"> {
|
[openmp] Move Directive and Clause helper function to tablegen
Summary:
Follow up to D81736. Move getOpenMPDirectiveKind, getOpenMPClauseKind, getOpenMPDirectiveName and
getOpenMPClauseName to the new tablegen code generation. The code is generated in a new file named OMP.cpp.inc
Reviewers: jdoerfert, jdenny, thakis
Reviewed By: jdoerfert, jdenny
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, llvm-commits, thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82405
2020-06-30 20:36:37 +02:00
|
|
|
let alternativeName = "threadprivate or thread local";
|
2020-11-13 16:31:53 +01:00
|
|
|
let isImplicit = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMPC_Unknown : Clause<"unknown"> {
|
2020-11-13 16:31:53 +01:00
|
|
|
let isImplicit = true;
|
|
|
|
let isDefault = true;
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2020-08-11 16:43:56 +02:00
|
|
|
def OMPC_Link : Clause<"link"> {
|
2021-01-19 16:28:09 +01:00
|
|
|
let flangClass = "OmpObjectList";
|
2020-08-11 16:43:56 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMPC_Inbranch : Clause<"inbranch"> {}
|
|
|
|
def OMPC_Notinbranch : Clause<"notinbranch"> {}
|
2021-04-09 21:00:36 +02:00
|
|
|
def OMPC_Filter : Clause<"filter"> {
|
|
|
|
let clangClass = "OMPFilterClause";
|
|
|
|
let flangClass = "ScalarIntExpr";
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Definition of OpenMP directives
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def OMP_ThreadPrivate : Directive<"threadprivate"> {}
|
|
|
|
def OMP_Parallel : Directive<"parallel"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
2020-10-27 17:23:52 +01:00
|
|
|
VersionedClause<OMPC_Default>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Task : Directive<"task"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_InReduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Detach, 50>,
|
|
|
|
VersionedClause<OMPC_Affinity, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
2020-10-27 17:23:52 +01:00
|
|
|
VersionedClause<OMPC_Default>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Priority>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Simd : Directive<"simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_If, 50>,
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2021-02-12 20:26:59 +01:00
|
|
|
def OMP_Tile : Directive<"tile"> {
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Sizes, 51>,
|
|
|
|
];
|
|
|
|
}
|
2021-06-10 21:24:17 +02:00
|
|
|
def OMP_Unroll : Directive<"unroll"> {
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Full, 51>,
|
|
|
|
VersionedClause<OMPC_Partial, 51>,
|
|
|
|
];
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_For : Directive<"for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_Do : Directive<"do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Reduction>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_NoWait>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_Sections : Directive<"sections"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Section : Directive<"section"> {}
|
|
|
|
def OMP_Single : Directive<"single"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_CopyPrivate>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Master : Directive<"master"> {}
|
|
|
|
def OMP_Critical : Directive<"critical"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Hint>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TaskYield : Directive<"taskyield"> {}
|
|
|
|
def OMP_Barrier : Directive<"barrier"> {}
|
2020-07-16 06:40:59 +02:00
|
|
|
def OMP_TaskWait : Directive<"taskwait"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Depend, 50>
|
|
|
|
];
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TaskGroup : Directive<"taskgroup"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_TaskReduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Flush : Directive<"flush"> {
|
2020-12-14 09:00:26 +01:00
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_AcqRel, 50>,
|
|
|
|
VersionedClause<OMPC_Acquire, 50>,
|
|
|
|
VersionedClause<OMPC_Release, 50>,
|
|
|
|
// TODO This should ne `none` instead. Comment carried over from
|
|
|
|
// OMPKinds.def.
|
|
|
|
VersionedClause<OMPC_Flush>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Ordered : Directive<"ordered"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Threads>,
|
|
|
|
VersionedClause<OMPC_Simd>,
|
|
|
|
VersionedClause<OMPC_Depend>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Atomic : Directive<"atomic"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Read>,
|
|
|
|
VersionedClause<OMPC_Write>,
|
|
|
|
VersionedClause<OMPC_Update>,
|
|
|
|
VersionedClause<OMPC_Capture>,
|
2020-12-14 08:11:39 +01:00
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_SeqCst>,
|
|
|
|
VersionedClause<OMPC_AcqRel, 50>,
|
|
|
|
VersionedClause<OMPC_Acquire, 50>,
|
|
|
|
VersionedClause<OMPC_Release, 50>,
|
|
|
|
VersionedClause<OMPC_Relaxed, 50>,
|
|
|
|
VersionedClause<OMPC_Hint, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Target : Directive<"target"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NoWait>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Teams : Directive<"teams"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Cancel : Directive<"cancel"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Requires : Directive<"requires"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_UnifiedAddress>,
|
|
|
|
VersionedClause<OMPC_UnifiedSharedMemory>,
|
|
|
|
VersionedClause<OMPC_ReverseOffload>,
|
|
|
|
VersionedClause<OMPC_DynamicAllocators>,
|
|
|
|
VersionedClause<OMPC_AtomicDefaultMemOrder>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetData : Directive<"target data"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_UseDevicePtr>,
|
|
|
|
VersionedClause<OMPC_UseDeviceAddr, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_If>
|
|
|
|
];
|
|
|
|
let requiredClauses = [
|
|
|
|
VersionedClause<OMPC_Map>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetEnterData : Directive<"target enter data"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
2020-07-23 03:31:07 +02:00
|
|
|
VersionedClause<OMPC_Depend>
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_NoWait>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
2020-07-23 03:31:07 +02:00
|
|
|
let requiredClauses = [
|
|
|
|
VersionedClause<OMPC_Map>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetExitData : Directive<"target exit data"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
2020-07-23 03:31:07 +02:00
|
|
|
VersionedClause<OMPC_Depend>
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Device>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NoWait>
|
|
|
|
];
|
|
|
|
let requiredClauses = [
|
|
|
|
VersionedClause<OMPC_Map>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetParallel : Directive<"target parallel"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetParallelFor : Directive<"target parallel for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TargetParallelDo : Directive<"target parallel do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Allocator>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_UsesAllocators>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Copyin>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_NoWait>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetUpdate : Directive<"target update"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_To>,
|
|
|
|
VersionedClause<OMPC_From>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_ParallelFor : Directive<"parallel for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_ParallelDo : Directive<"parallel do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Collapse>
|
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_ParallelForSimd : Directive<"parallel for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_ParallelDoSimd : Directive<"parallel do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal>,
|
|
|
|
VersionedClause<OMPC_Order>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>
|
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_ParallelMaster : Directive<"parallel master"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_ParallelSections : Directive<"parallel sections"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_NumThreads>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_ForSimd : Directive<"for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_If, 50>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_DoSimd : Directive<"do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Reduction>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_NoWait>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_CancellationPoint : Directive<"cancellation point"> {}
|
|
|
|
def OMP_DeclareReduction : Directive<"declare reduction"> {}
|
|
|
|
def OMP_DeclareMapper : Directive<"declare mapper"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Map>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
def OMP_DeclareSimd : Directive<"declare simd"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Uniform>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_SimdLen>
|
|
|
|
];
|
|
|
|
let allowedExclusiveClauses = [
|
|
|
|
VersionedClause<OMPC_Inbranch>,
|
|
|
|
VersionedClause<OMPC_Notinbranch>
|
|
|
|
];
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TaskLoop : Directive<"taskloop"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_InReduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
2020-10-27 17:23:52 +01:00
|
|
|
VersionedClause<OMPC_Default>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Priority>,
|
|
|
|
];
|
|
|
|
let allowedExclusiveClauses = [
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NumTasks>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TaskLoopSimd : Directive<"taskloop simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_InReduction>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Mergeable>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Untied>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Priority>
|
|
|
|
];
|
|
|
|
let allowedExclusiveClauses = [
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NumTasks>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Distribute : Directive<"distribute"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[OpenMP] Overhaul `declare target` handling
This patch fixes various issues with our prior `declare target` handling
and extends it to support `omp begin declare target` as well.
This started with PR49649 in mind, trying to provide a way for users to
avoid the "ref" global use introduced for globals with internal linkage.
From there it went down the rabbit hole, e.g., all variables, even
`nohost` ones, were emitted into the device code so it was impossible to
determine if "ref" was needed late in the game (based on the name only).
To make it really useful, `begin declare target` was needed as it can
carry the `device_type`. Not emitting variables eagerly had a ripple
effect. Finally, the precedence of the (explicit) declare target list
items needed to be taken into account, that meant we cannot just look
for any declare target attribute to make a decision. This caused the
handling of functions to require fixup as well.
I tried to clean up things while I was at it, e.g., we should not "parse
declarations and defintions" as part of OpenMP parsing, this will always
break at some point. Instead, we keep track what region we are in and
act on definitions and declarations instead, this is what we do for
declare variant and other begin/end directives already.
Highlights:
- new diagnosis for restrictions specificed in the standard,
- delayed emission of globals not mentioned in an explicit
list of a declare target,
- omission of `nohost` globals on the host and `host` globals on the
device,
- no explicit parsing of declarations in-between `omp [begin] declare
variant` and the corresponding end anymore, regular parsing instead,
- precedence for explicit mentions in `declare target` lists over
implicit mentions in the declaration-definition-seq, and
- `omp allocate` declarations will now replace an earlier emitted
global, if necessary.
---
Notes:
The patch is larger than I hoped but it turns out that most changes do
on their own lead to "inconsistent states", which seem less desirable
overall.
After working through this I feel the standard should remove the
explicit declare target forms as the delayed emission is horrible.
That said, while we delay things anyway, it seems to me we check too
often for the current status even though that is often not sufficient to
act upon. There seems to be a lot of duplication that can probably be
trimmed down. Eagerly emitting some things seems pretty weak as an
argument to keep so much logic around.
---
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D101030
2021-04-22 07:57:28 +02:00
|
|
|
def OMP_BeginDeclareTarget : Directive<"begin declare target"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_To>,
|
|
|
|
VersionedClause<OMPC_Link>,
|
|
|
|
VersionedClause<OMPC_DeviceType>,
|
|
|
|
];
|
|
|
|
}
|
2020-11-05 09:55:06 +01:00
|
|
|
def OMP_DeclareTarget : Directive<"declare target"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_To>,
|
|
|
|
VersionedClause<OMPC_Link>
|
|
|
|
];
|
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_EndDeclareTarget : Directive<"end declare target"> {}
|
|
|
|
def OMP_DistributeParallelFor : Directive<"distribute parallel for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_DistributeParallelDo : Directive<"distribute parallel do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Private>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Linear>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Ordered>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_DistributeParallelForSimd : Directive<"distribute parallel for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_DistributeParallelDoSimd : Directive<"distribute parallel do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal>,
|
|
|
|
VersionedClause<OMPC_Order>
|
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_DistributeSimd : Directive<"distribute simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Reduction>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If, 50>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetParallelForSimd : Directive<"target parallel for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TargetParallelDoSimd : Directive<"target parallel do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators>
|
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetSimd : Directive<"target simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Map>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_NoWait>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Order, 50>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Schedule>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TeamsDistribute : Directive<"teams distribute"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Shared>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Collapse>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If, 50>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_ThreadLimit>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TeamsDistributeParallelForSimd :
|
|
|
|
Directive<"teams distribute parallel for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TeamsDistributeParallelDoSimd :
|
|
|
|
Directive<"teams distribute parallel do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Private>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_NonTemporal>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TeamsDistributeParallelFor :
|
|
|
|
Directive<"teams distribute parallel for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TeamsDistributeParallelDo :
|
|
|
|
Directive<"teams distribute parallel do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Private>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Linear>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Schedule>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetTeams : Directive<"target teams"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>,
|
|
|
|
VersionedClause<OMPC_Shared>
|
|
|
|
];
|
|
|
|
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_DistSchedule>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetTeamsDistributeParallelFor :
|
|
|
|
Directive<"target teams distribute parallel for"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TargetTeamsDistributeParallelDo :
|
|
|
|
Directive<"target teams distribute parallel do"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Order>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetTeamsDistributeParallelForSimd :
|
|
|
|
Directive<"target teams distribute parallel for simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_TargetTeamsDistributeParallelDoSimd :
|
|
|
|
Directive<"target teams distribute parallel do simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Ordered>,
|
|
|
|
VersionedClause<OMPC_Order>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_NonTemporal>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Schedule>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_SimdLen>
|
2020-07-07 04:19:43 +02:00
|
|
|
];
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_TargetTeamsDistributeSimd :
|
|
|
|
Directive<"target teams distribute simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Depend>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Map>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Reduction>,
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_UsesAllocators, 50>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_DefaultMap>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_NumTeams>,
|
|
|
|
VersionedClause<OMPC_ThreadLimit>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_DistSchedule>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Allocate : Directive<"allocate"> {
|
2021-04-22 17:45:19 +02:00
|
|
|
let allowedOnceClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_Allocator>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_DeclareVariant : Directive<"declare variant"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Match>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_MasterTaskloop : Directive<"master taskloop"> {
|
|
|
|
let allowedClauses = [
|
2020-07-07 04:19:43 +02:00
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_Priority>,
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_NumTasks>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_InReduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_ParallelMasterTaskloop :
|
|
|
|
Directive<"parallel master taskloop"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_Priority>,
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_NumTasks>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Copyin>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_MasterTaskloopSimd : Directive<"master taskloop simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_Priority>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_NumTasks>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_InReduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_ParallelMasterTaskloopSimd :
|
|
|
|
Directive<"parallel master taskloop simd"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_Shared>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_LastPrivate>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_Collapse>,
|
|
|
|
VersionedClause<OMPC_Final>,
|
|
|
|
VersionedClause<OMPC_Untied>,
|
|
|
|
VersionedClause<OMPC_Mergeable>,
|
|
|
|
VersionedClause<OMPC_Priority>,
|
|
|
|
VersionedClause<OMPC_GrainSize>,
|
|
|
|
VersionedClause<OMPC_NoGroup>,
|
|
|
|
VersionedClause<OMPC_NumTasks>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Linear>,
|
|
|
|
VersionedClause<OMPC_Aligned>,
|
|
|
|
VersionedClause<OMPC_SafeLen>,
|
|
|
|
VersionedClause<OMPC_SimdLen>,
|
|
|
|
VersionedClause<OMPC_NonTemporal, 50>,
|
|
|
|
VersionedClause<OMPC_Order, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Depobj : Directive<"depobj"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Depend, 50>,
|
|
|
|
VersionedClause<OMPC_Destroy, 50>,
|
|
|
|
VersionedClause<OMPC_Update, 50>,
|
|
|
|
// TODO This should ne `none` instead. Comment carried over from
|
|
|
|
// OMPKinds.def.
|
|
|
|
VersionedClause<OMPC_Depobj, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
|
|
|
def OMP_Scan : Directive<"scan"> {
|
2020-07-07 04:19:43 +02:00
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Inclusive, 50>,
|
|
|
|
VersionedClause<OMPC_Exclusive, 50>
|
|
|
|
];
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
}
|
2020-11-23 18:48:59 +01:00
|
|
|
def OMP_Assumes : Directive<"assumes"> {}
|
|
|
|
def OMP_BeginAssumes : Directive<"begin assumes"> {}
|
|
|
|
def OMP_EndAssumes : Directive<"end assumes"> {}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 15:29:50 +02:00
|
|
|
def OMP_BeginDeclareVariant : Directive<"begin declare variant"> {}
|
|
|
|
def OMP_EndDeclareVariant : Directive<"end declare variant"> {}
|
[flang][openmp] Check clauses allowed semantic with tablegen generated map
Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.
Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert
Reviewed By: DavidTruby, ichoyjx
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83326
2020-07-11 18:42:05 +02:00
|
|
|
def OMP_ParallelWorkshare : Directive<"parallel workshare"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Allocate>,
|
|
|
|
VersionedClause<OMPC_Copyin>,
|
|
|
|
VersionedClause<OMPC_Default>,
|
|
|
|
VersionedClause<OMPC_FirstPrivate>,
|
|
|
|
VersionedClause<OMPC_Private>,
|
|
|
|
VersionedClause<OMPC_Reduction>,
|
|
|
|
VersionedClause<OMPC_Shared>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_If>,
|
|
|
|
VersionedClause<OMPC_NumThreads>,
|
|
|
|
VersionedClause<OMPC_ProcBind>
|
|
|
|
];
|
|
|
|
}
|
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
2020-07-02 02:57:11 +02:00
|
|
|
def OMP_Workshare : Directive<"workshare"> {}
|
|
|
|
def OMP_EndDo : Directive<"end do"> {}
|
|
|
|
def OMP_EndDoSimd : Directive<"end do simd"> {}
|
2020-11-05 09:55:06 +01:00
|
|
|
def OMP_EndSections : Directive<"end sections"> {
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_NoWait>
|
|
|
|
];
|
|
|
|
}
|
|
|
|
def OMP_EndSingle : Directive<"end single"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_CopyPrivate>
|
|
|
|
];
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_NoWait>
|
|
|
|
];
|
|
|
|
}
|
|
|
|
def OMP_EndWorkshare : Directive<"end workshare"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_NoWait>
|
|
|
|
];
|
|
|
|
}
|
2021-03-15 21:09:46 +01:00
|
|
|
def OMP_interop : Directive<"interop"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_Depend>,
|
2021-03-18 00:43:47 +01:00
|
|
|
VersionedClause<OMPC_Destroy>,
|
2021-03-15 21:09:46 +01:00
|
|
|
VersionedClause<OMPC_Init>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
2021-03-17 21:04:08 +01:00
|
|
|
VersionedClause<OMPC_Use>,
|
2021-03-15 21:09:46 +01:00
|
|
|
];
|
|
|
|
}
|
2021-03-23 02:13:29 +01:00
|
|
|
def OMP_dispatch : Directive<"dispatch"> {
|
|
|
|
let allowedClauses = [
|
|
|
|
VersionedClause<OMPC_Device>,
|
|
|
|
VersionedClause<OMPC_IsDevicePtr>,
|
|
|
|
VersionedClause<OMPC_NoWait>,
|
2021-03-31 21:26:47 +02:00
|
|
|
VersionedClause<OMPC_Depend>,
|
2021-04-03 20:09:25 +02:00
|
|
|
VersionedClause<OMPC_Novariants>,
|
|
|
|
VersionedClause<OMPC_Nocontext>
|
2021-03-23 02:13:29 +01:00
|
|
|
];
|
|
|
|
}
|
2021-04-09 21:00:36 +02:00
|
|
|
def OMP_masked : Directive<"masked"> {
|
|
|
|
let allowedOnceClauses = [
|
|
|
|
VersionedClause<OMPC_Filter>
|
|
|
|
];
|
|
|
|
}
|
[openmp] Move Directive and Clause helper function to tablegen
Summary:
Follow up to D81736. Move getOpenMPDirectiveKind, getOpenMPClauseKind, getOpenMPDirectiveName and
getOpenMPClauseName to the new tablegen code generation. The code is generated in a new file named OMP.cpp.inc
Reviewers: jdoerfert, jdenny, thakis
Reviewed By: jdoerfert, jdenny
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, llvm-commits, thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82405
2020-06-30 20:36:37 +02:00
|
|
|
def OMP_Unknown : Directive<"unknown"> {
|
2020-11-13 16:31:53 +01:00
|
|
|
let isDefault = true;
|
[openmp] Move Directive and Clause helper function to tablegen
Summary:
Follow up to D81736. Move getOpenMPDirectiveKind, getOpenMPClauseKind, getOpenMPDirectiveName and
getOpenMPClauseName to the new tablegen code generation. The code is generated in a new file named OMP.cpp.inc
Reviewers: jdoerfert, jdenny, thakis
Reviewed By: jdoerfert, jdenny
Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, llvm-commits, thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82405
2020-06-30 20:36:37 +02:00
|
|
|
}
|