[flang][OpenMP] Add some semantic checks for threadprivate and declare target directives
This supports the following checks for THREADPRIVATE Directive: ``` [5.1] 2.21.2 THREADPRIVATE Directive A threadprivate variable must not appear in any clause except the copyin, copyprivate, schedule, num_threads, thread_limit, and if clauses. ``` This supports the following checks for DECLARE TARGET Directive: ``` [5.1] 2.14.7 Declare Target Directive A threadprivate variable cannot appear in the directive. ``` Besides, procedure name and the entity with PARAMETER attribute cannot be in the threadprivate directive. The main program name and module name cannot be in the threadprivate directive and declare target directive. There is no clear description or restriction about the entity with PARAMETER attribute in OpenMP 5.1 Specification, and a warning is given. Reviewed By: kiranchandramohan, shraiysh, NimishMishra Differential Revision: https://reviews.llvm.org/D114941
Loading
Please sign in to comment