mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 13:21:00 +08:00
This patch introduces the upper part of the Ada front-end support for a first set of OpenACC directives (Acc_Kernels, Acc_Loop, Acc_Parallel, Acc_Data) and their clauses. The pragmas syntax is documented, pragmas are recognized and checked for syntactic correctness, keyed on -fopenacc. A couple of new flags are defined on loop statements in the GNAT tree. 2018-09-26 Olivier Hainque <hainque@adacore.com> gcc/ada/ * opt.ads (OpenAcc_Enabled): New flag. False by default. True when OpenACC pragmas are requested to be honored, when -fopenacc is found on the command line. * back_end.adb (Scan_Compiler_Arguments): Set OpenACC_Enabled if -fopenacc is seen on the command line. * sinfo.adb, sinfo.ads (Is_OpenAcc_Environment): New flag/predicate on Loop statements which embed an Acc_Kernels, Acc_Parallel or Acc_Data pragma. (Is_OpenAcc_Loop): New flag/predicate on Loop statements which embed an Acc_Loop pragma. (Set_Is_OpenAcc_Environment, Set_Is_OpenAcc_Loop): Setters for the new flags. * par-prag.adb (Prag): Handle Acc_Data, Acc_Loop, Acc_Parallel and Acc_Kernels pragmas. Nothing to do here, all handled by sem_prag. * sem_prag.adb (Acc_First, Acc_Next, Validate_Acc_Condition_Clause, Validate_Acc_Data_Clause, Validate_Acc_Int_Expr_Clause, Validate_Acc_Int_Expr_List_Clause, Validate_Acc_Loop_Collapse, Validate_Acc_Loop_Gang, Validate_Acc_Loop_Vector, Validate_Acc_Loop_Worker, Validate_Acc_Name_Reduction, Validate_Acc_Size_Expressions): New helper for Analyze_Pragma, to handle OpenACC pragmas. (Analyze_Pragma): Handle Acc_Data, Acc_Loop, Acc_Parallel and Acc_Kernels pragmas. * sem_ch5.adb (Disable_Constant): Unset Is_True_Constant on variable entity, action for ... (Disable_Constants): Helper for Analyze_Loop_Statement, to ... (Analyze_Loop_Statement): Disable True_Constant on variables referenced within an OpenACC environment. * snames.ads-tmpl: Declare Name_Ids for the OpenACC directives and clauses we can handle. Remove an exraneous whitespace before columns, preventing line length overflow in the generated spec with Ids now reaching beyond 999. * doc/gnat_rm/implementation_defined_pragmas.rst: Document pragma Acc_Parallel, Acc_Loop, Acc_Kernels and Acc_Data. * gnat_rm.texi: Regenerate. From-SVN: r264617
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
31.9%
C
31.3%
Ada
12%
D
6.5%
Go
6.4%
Other
11.5%