Commit 95f2be29 by Olivier Hainque Committed by Pierre-Marie de Rodat

[Ada] Front-end support for OpenACC pragmas

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
parent 8e532681
2018-09-26 Olivier Hainque <hainque@adacore.com>
* 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.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Is_Onown_Limited): A derived type whose parent P
......
......@@ -375,6 +375,9 @@ package body Back_End is
elsif Is_Front_End_Switch (Argv) then
Scan_Front_End_Switches (Argv, Args, Next_Arg);
elsif Argv (Argv'First + 1 .. Argv'Last) = "fopenacc" then
Opt.OpenAcc_Enabled := True;
-- All non-front-end switches are back-end switches
else
......
......@@ -89,6 +89,158 @@ Syntax:
For the semantics of this pragma, see the entry for aspect ``Abstract_State`` in
the SPARK 2014 Reference Manual, section 7.1.4.
Pragma Acc_Parallel
===================
Syntax:
.. code-block:: ada
pragma Acc_Parallel [( ACC_PARALLEL_CLAUSE [, ACC_PARALLEL_CLAUSE... ])];
ACC_PARALLEL_CLAUSE ::=
Acc_If => boolean_EXPRESSION
| Acc_Private => IDENTIFIERS
| Async => integer_EXPRESSION
| Copy => IDENTIFIERS
| Copy_In => IDENTIFIERS
| Copy_Out => IDENTIFIERS
| Create => IDENTIFIERS
| Default => None
| Device_Ptr => IDENTIFIERS
| First_Private => IDENTIFIERS
| Num_Gangs => integer_EXPRESSION
| Num_Workers => integer_EXPRESSION
| Present => IDENTIFIERS
| Reduction => (REDUCTION_RECORD)
| Vector_Length => integer_EXPRESSION
| Wait => INTEGERS
REDUCTION_RECORD ::=
"+" => IDENTIFIERS
| "*" => IDENTIFIERS
| "min" => IDENTIFIERS
| "max" => IDENTIFIERS
| "or" => IDENTIFIERS
| "and" => IDENTIFIERS
IDENTIFIERS ::=
| IDENTIFIER
| (IDENTIFIER, IDENTIFIERS)
INTEGERS ::=
| integer_EXPRESSION
| (integer_EXPRESSION, INTEGERS)
Requires the :switch:`-fopenacc` flag.
Equivalent to the ``parallel`` directive of the OpenAcc standard. This pragma
should be placed in loops. It offloads the content of the loop to an
accelerator device.
For more information about the effect of the clauses, see the OpenAcc
specification.
Pragma Acc_Loop
===============
Syntax:
.. code-block:: ada
pragma Acc_Loop [( ACC_LOOP_CLAUSE [, ACC_LOOP_CLAUSE... ])];
ACC_LOOP_CLAUSE ::=
Auto
| Collapse => INTEGER_LITERAL
| Gang [=> GANG_ARG]
| Independent
| Private => IDENTIFIERS
| Reduction => (REDUCTION_RECORD)
| Seq
| Tile => SIZE_EXPRESSION
| Vector [=> integer_EXPRESSION]
| Worker [=> integer_EXPRESSION]
GANG_ARG ::=
integer_EXPRESSION
| Static => SIZE_EXPRESSION
SIZE_EXPRESSION ::=
*
| integer_EXPRESSION
Requires the :switch:`-fopenacc` flag.
Equivalent to the ``loop`` directive of the OpenAcc standard. This pragma
should be placed in for loops after the "Acc_Parallel" pragma. It tells the
compiler how to parallelize the loop.
For more information about the effect of the clauses, see the OpenAcc
specification.
Pragma Acc_Kernels
==================
Syntax:
.. code-block:: ada
pragma Acc_Kernels [( ACC_KERNELS_CLAUSE [, ACC_KERNELS_CLAUSE...])];
ACC_KERNELS_CLAUSE ::=
Acc_If => boolean_EXPRESSION
| Async => integer_EXPRESSION
| Copy => IDENTIFIERS
| Copy_In => IDENTIFIERS
| Copy_Out => IDENTIFIERS
| Create => IDENTIFIERS
| Default => None
| Device_Ptr => IDENTIFIERS
| Num_Gangs => integer_EXPRESSION
| Num_Workers => integer_EXPRESSION
| Present => IDENTIFIERS
| Vector_Length => integer_EXPRESSION
| Wait => INTEGERS
IDENTIFIERS ::=
| IDENTIFIER
| (IDENTIFIER, IDENTIFIERS)
INTEGERS ::=
| integer_EXPRESSION
| (integer_EXPRESSION, INTEGERS)
Requires the :switch:`-fopenacc` flag.
Equivalent to the kernels directive of the OpenAcc standard. This pragma should
be placed in loops.
For more information about the effect of the clauses, see the OpenAcc
specification.
Pragma Acc_Data
===============
Syntax:
.. code-block:: ada
pragma Acc_Data ([ ACC_DATA_CLAUSE [, ACC_DATA_CLAUSE...]]);
ACC_DATA_CLAUSE ::=
Copy => IDENTIFIERS
| Copy_In => IDENTIFIERS
| Copy_Out => IDENTIFIERS
| Create => IDENTIFIERS
| Device_Ptr => IDENTIFIERS
| Present => IDENTIFIERS
Requires the :switch:`-fopenacc` flag.
Equivalent to the ``data`` directive of the OpenAcc standard. This pragma
should be placed in loops.
For more information about the effect of the clauses, see the OpenAcc
specification.
Pragma Ada_83
=============
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2335,6 +2335,15 @@ package Opt is
-- The only special comment sequence allowed is --!
-------------
-- OpenAcc --
-------------
OpenAcc_Enabled : Boolean := False;
-- GNAT
-- Indicates whether OpenAcc pragmas should be taken into account.
-- Set True by use of -fopenacc.
--------------------------
-- Private Declarations --
--------------------------
......
......@@ -1516,6 +1516,10 @@ begin
| Pragma_Warning_As_Error
| Pragma_Weak_External
| Pragma_Validity_Checks
| Pragma_Acc_Data
| Pragma_Acc_Kernels
| Pragma_Acc_Loop
| Pragma_Acc_Parallel
=>
null;
......
......@@ -3361,6 +3361,9 @@ package body Sem_Ch5 is
procedure Analyze_Loop_Statement (N : Node_Id) is
function Disable_Constant (N : Node_Id) return Traverse_Result;
-- If N represents an E_Variable entity, set Is_True_Constant To False
function Is_Container_Iterator (Iter : Node_Id) return Boolean;
-- Given a loop iteration scheme, determine whether it is an Ada 2012
-- container iteration.
......@@ -3371,6 +3374,25 @@ package body Sem_Ch5 is
-- iterators. Prevents infinite recursion when block is analyzed.
-- Routine is a noop if loop is single statement within source block.
----------------------
-- Disable_Constant --
----------------------
function Disable_Constant (N : Node_Id) return Traverse_Result is
begin
if Is_Entity_Name (N)
and then Present (Entity (N))
and then Ekind (Entity (N)) = E_Variable
then
Set_Is_True_Constant (Entity (N), False);
end if;
return OK;
end Disable_Constant;
procedure Disable_Constants is new Traverse_Proc (Disable_Constant);
-- Helper for Analyze_Loop_Statement, to unset Is_True_Constant on
-- variables referenced within an OpenACC environment.
---------------------------
-- Is_Container_Iterator --
---------------------------
......@@ -3812,6 +3834,15 @@ package body Sem_Ch5 is
if No (Iter) and then not Has_Exit (Ent) then
Check_Unreachable_Code (Stmt);
end if;
-- Variables referenced within a loop subject to possible OpenACC
-- offloading may be implicitly written to as part of the OpenACC
-- transaction. Clear flags possibly conveying that they are constant,
-- set for example when the code does not explicitly assign them.
if Is_OpenAcc_Environment (Stmt) then
Disable_Constants (Stmt);
end if;
end Analyze_Loop_Statement;
----------------------------
......
......@@ -3685,6 +3685,12 @@ package body Sem_Prag is
-- Local Subprograms --
-----------------------
function Acc_First (N : Node_Id) return Node_Id;
-- Helper function to iterate over arguments given to OpenAcc pragmas.
function Acc_Next (N : Node_Id) return Node_Id;
-- Helper function to iterate over arguments given to OpenAcc pragmas.
procedure Acquire_Warning_Match_String (Arg : Node_Id);
-- Used by pragma Warnings (Off, string), and Warn_As_Error (string) to
-- get the given string argument, and place it in Name_Buffer, adding
......@@ -4234,6 +4240,85 @@ package body Sem_Prag is
-- which is used for error messages on any constructs violating the
-- profile.
procedure Validate_Acc_Condition_Clause (Clause : Node_Id);
-- Make sure the argument of a given Acc_If clause is a boolean.
procedure Validate_Acc_Data_Clause (Clause : Node_Id);
-- Make sure the argument of an OpenAcc data clause (e.g. Copy, Copyin,
-- Copyout...) is an identifier or an aggregate of identifiers.
procedure Validate_Acc_Int_Expr_Clause (Clause : Node_Id);
-- Make sure the argument of an OpenAcc clause is an Integer expression.
procedure Validate_Acc_Int_Expr_List_Clause (Clause : Node_Id);
-- Make sure the argument of an OpenAcc clause is an Integer expression
-- or a list of Integer expressions.
procedure Validate_Acc_Loop_Collapse (Clause : Node_Id);
-- Make sure that the parent loop of the Acc_Loop(Collapse => N) pragma
-- contains at least N-1 nested loops.
procedure Validate_Acc_Loop_Gang (Clause : Node_Id);
-- Make sure the argument of the Gang clause of a Loop directive is
-- either an integer expression or a (Static => integer expressions)
-- aggregate.
procedure Validate_Acc_Loop_Vector (Clause : Node_Id);
-- When this procedure is called in a construct offloaded by an
-- Acc_Kernels pragma, makes sure that a Vector_Length clause does
-- not exist on said pragma.
-- In all cases, make sure the argument is an integer expression.
procedure Validate_Acc_Loop_Worker (Clause : Node_Id);
-- When this procedure is called in a construct offloaded by an
-- Acc_Parallel pragma, makes sure that no argument has been given.
-- When this procedure is called in a construct offloaded by an
-- Acc_Kernels pragma and if Loop_Worker was given an argument,
-- makes sure that the Num_Workers clause does not appear on the
-- Acc_Kernels pragma and that the argument is an integer.
procedure Validate_Acc_Name_Reduction (Clause : Node_Id);
-- Make sure the reduction clause is an aggregate made of a string
-- representing a supported reduction operation (i.e. "+", "*", "and",
-- "or", "min" or "max") and either an identifier or aggregate of
-- identifiers.
procedure Validate_Acc_Size_Expressions (Clause : Node_Id);
-- Makes sure that Clause is either an integer expression or an
-- association with a Static as name and a list of integer expressions
-- or "*" strings on the right hand side.
---------------
-- Acc_First --
---------------
function Acc_First (N : Node_Id) return Node_Id is
begin
if Nkind (N) = N_Aggregate then
if Present (Expressions (N)) then
return First (Expressions (N));
elsif Present (Component_Associations (N)) then
return Expression (First (Component_Associations (N)));
end if;
end if;
return N;
end Acc_First;
--------------
-- Acc_Next --
--------------
function Acc_Next (N : Node_Id) return Node_Id is
begin
if Nkind (Parent (N)) = N_Component_Association then
return Expression (Next (Parent (N)));
elsif Nkind (Parent (N)) = N_Aggregate then
return Next (N);
else
return Empty;
end if;
end Acc_Next;
----------------------------------
-- Acquire_Warning_Match_String --
----------------------------------
......@@ -11082,6 +11167,248 @@ package body Sem_Prag is
end if;
end Set_Ravenscar_Profile;
-----------------------------------
-- Validate_Acc_Condition_Clause --
-----------------------------------
procedure Validate_Acc_Condition_Clause (Clause : Node_Id) is
begin
Analyze_And_Resolve (Clause);
if not Is_Boolean_Type (Etype (Clause)) then
Error_Pragma ("Expected a boolean");
end if;
end Validate_Acc_Condition_Clause;
------------------------------
-- Validate_Acc_Data_Clause --
------------------------------
procedure Validate_Acc_Data_Clause (Clause : Node_Id) is
Expr : Node_Id;
begin
Expr := Acc_First (Clause);
while Present (Expr) loop
if Nkind (Expr) /= N_Identifier then
Error_Pragma ("Expected an Identifer");
end if;
Analyze_And_Resolve (Expr);
Expr := Acc_Next (Expr);
end loop;
end Validate_Acc_Data_Clause;
----------------------------------
-- Validate_Acc_Int_Expr_Clause --
----------------------------------
procedure Validate_Acc_Int_Expr_Clause (Clause : Node_Id) is
begin
Analyze_And_Resolve (Clause);
if not Is_Integer_Type (Etype (Clause)) then
Error_Pragma_Arg ("Expected an integer", Clause);
end if;
end Validate_Acc_Int_Expr_Clause;
---------------------------------------
-- Validate_Acc_Int_Expr_List_Clause --
---------------------------------------
procedure Validate_Acc_Int_Expr_List_Clause (Clause : Node_Id) is
Expr : Node_Id;
begin
Expr := Acc_First (Clause);
while Present (Expr) loop
Analyze_And_Resolve (Expr);
if not Is_Integer_Type (Etype (Expr)) then
Error_Pragma ("Expected an Integer");
end if;
Expr := Acc_Next (Expr);
end loop;
end Validate_Acc_Int_Expr_List_Clause;
--------------------------------
-- Validate_Acc_Loop_Collapse --
--------------------------------
procedure Validate_Acc_Loop_Collapse (Clause : Node_Id) is
Count : Uint;
Parent_Loop : Node_Id;
Current_Statement : Node_Id;
begin
-- Make sure the argument is a positive integer.
Analyze_And_Resolve (Clause);
Count := Static_Integer (Clause);
if Count = No_Uint or else Count < 1 then
Error_Pragma_Arg ("Expected a positive integer", Clause);
end if;
-- Then, make sure we have at least Count-1 tightly-nested loops
-- (i.e. loops with no statements in between).
Parent_Loop := Parent (Parent (Parent (Clause)));
Current_Statement := First (Statements (Parent_Loop));
-- Skip first pragmas in the parent loop
while Present (Current_Statement)
and then Nkind (Current_Statement) = N_Pragma loop
Current_Statement := Next (Current_Statement);
end loop;
if not Present (Next (Current_Statement)) then
While_Loop :
while Nkind (Current_Statement) = N_Loop_Statement
and Count > 1 loop
Current_Statement := First (Statements (Current_Statement));
exit While_Loop when Present (Next (Current_Statement));
Count := Count - 1;
end loop While_Loop;
end if;
if Count > 1 then
Error_Pragma_Arg ("Collapse argument too high or loops not " &
"tightly nested.", Clause);
end if;
end Validate_Acc_Loop_Collapse;
----------------------------
-- Validate_Acc_Loop_Gang --
----------------------------
procedure Validate_Acc_Loop_Gang (Clause : Node_Id) is
begin
Error_Pragma_Arg ("Loop_Gang not implemented", Clause);
end Validate_Acc_Loop_Gang;
------------------------------
-- Validate_Acc_Loop_Vector --
------------------------------
procedure Validate_Acc_Loop_Vector (Clause : Node_Id) is
begin
Error_Pragma_Arg ("Loop_Vector not implemented", Clause);
end Validate_Acc_Loop_Vector;
-------------------------------
-- Validate_Acc_Loop_Worker --
-------------------------------
procedure Validate_Acc_Loop_Worker (Clause : Node_Id) is
begin
Error_Pragma_Arg ("Loop_Worker not implemented", Clause);
end Validate_Acc_Loop_Worker;
---------------------------------
-- Validate_Acc_Name_Reduction --
---------------------------------
procedure Validate_Acc_Name_Reduction (Clause : Node_Id) is
-- ??? On top of the following operations, the OpenAcc spec adds the
-- "bitwise and", "bitwise or" and modulo for C and ".eqv" and
-- ".neqv" for Fortran. Can we, should we and how do we support them
-- in Ada?
type Reduction_Op is (Add_Op, Mul_Op, Max_Op,
Min_Op, And_Op, Or_Op);
function To_Reduction_Op (Op : String) return Reduction_Op;
function To_Reduction_Op (Op : String) return Reduction_Op is
begin
if Op = "+" then
return Add_Op;
elsif Op = "*" then
return Mul_Op;
elsif Op = "max" then
return Max_Op;
elsif Op = "min" then
return Min_Op;
elsif Op = "and" then
return And_Op;
elsif Op = "or" then
return Or_Op;
else
Error_Pragma ("Unsuported reduction operation");
end if;
end To_Reduction_Op;
Expr : Node_Id;
Reduc_Op : Node_Id;
Reduc_Var : Node_Id;
Seen_Entities : Elist_Id;
begin
-- Reduction operations look like this:
-- ("+" => (a, b), "*" => c)
Seen_Entities := New_Elmt_List;
Expr := First (Component_Associations (Clause));
while Present (Expr) loop
Reduc_Op := First (Choices (Expr));
String_To_Name_Buffer (Strval (Reduc_Op));
case To_Reduction_Op (Name_Buffer (1 .. Name_Len)) is
when Add_Op | Mul_Op | Max_Op | Min_Op =>
Reduc_Var := Acc_First (Expression (Expr));
while Present (Reduc_Var) loop
Analyze_And_Resolve (Reduc_Var);
if Contains (Seen_Entities, Entity (Reduc_Var)) then
Error_Pragma ("Variable used in multiple reductions");
else
if (Nkind (Reduc_Var) /= N_Identifier)
or not Is_Numeric_Type (Etype (Reduc_Var))
then
Error_Pragma
("Expected an identifier for a Numeric");
end if;
Append_Elmt (Entity (Reduc_Var), Seen_Entities);
end if;
Reduc_Var := Acc_Next (Reduc_Var);
end loop;
when And_Op | Or_Op =>
Reduc_Var := Acc_First (Expression (Expr));
while Present (Reduc_Var) loop
Analyze_And_Resolve (Reduc_Var);
if Contains (Seen_Entities, Entity (Reduc_Var)) then
Error_Pragma ("Variable used in multiple " &
"reductions");
else
if Nkind (Reduc_Var) /= N_Identifier or not
Is_Boolean_Type (Etype (Reduc_Var))
then
Error_Pragma ("Expected a variable of type " &
"Boolean");
end if;
Append_Elmt (Entity (Reduc_Var), Seen_Entities);
end if;
Reduc_Var := Acc_Next (Reduc_Var);
end loop;
end case;
Expr := Next (Expr);
end loop;
end Validate_Acc_Name_Reduction;
-----------------------------------
-- Validate_Acc_Size_Expressions --
-----------------------------------
procedure Validate_Acc_Size_Expressions (Clause : Node_Id) is
-- A size expr is either an integer expression or "*"
function Validate_Size_Expr (Expr : Node_Id) return Boolean;
function Validate_Size_Expr (Expr : Node_Id) return Boolean is
begin
if Nkind (Expr) = N_Operator_Symbol then
return Get_String_Char (Strval (Expr), 1) = Get_Char_Code ('*');
end if;
Analyze_And_Resolve (Expr);
return Is_Integer_Type (Etype (Expr));
end Validate_Size_Expr;
Expr : Node_Id;
begin
Expr := Acc_First (Clause);
while Present (Expr) loop
if not Validate_Size_Expr (Expr) then
Error_Pragma ("Size expressions should be either integers " &
"or '*'");
end if;
Expr := Acc_Next (Expr);
end loop;
end Validate_Acc_Size_Expressions;
-- Start of processing for Analyze_Pragma
begin
......@@ -12025,6 +12352,256 @@ package body Sem_Prag is
Analyze_If_Present (Pragma_Initial_Condition);
end Abstract_State;
--------------
-- Acc_Data --
--------------
when Pragma_Acc_Data => Acc_Data : declare
Clause_Names : constant Name_List := (
Name_Attach,
Name_Copy,
Name_Copy_In,
Name_Copy_Out,
Name_Create,
Name_Delete,
Name_Detach,
Name_Device_Ptr,
Name_No_Create,
Name_Present
);
Clauses : Args_List (Clause_Names'Range);
Clause : Node_Id;
begin
if not OpenAcc_Enabled then
return;
end if;
GNAT_Pragma;
if Nkind (Parent (N)) /= N_Loop_Statement
then
Error_Pragma ("Acc_Data pragma should be placed in loop or "
& "block statements.");
end if;
Gather_Associations (Clause_Names, Clauses);
for Id in Clause_Names'First .. Clause_Names'Last loop
Clause := Clauses (Id);
if Present (Clause) then
case Clause_Names (Id) is
when Name_Copy
| Name_Copy_In
| Name_Copy_Out
| Name_Create
| Name_Device_Ptr
| Name_Present =>
Validate_Acc_Data_Clause (Clause);
when Name_Attach
| Name_Detach
| Name_Delete
| Name_No_Create =>
Error_Pragma ("Unsupported pragma clause.");
when others => raise Program_Error;
end case;
end if;
end loop;
Set_Is_OpenAcc_Environment (Parent (N));
end Acc_Data;
--------------
-- Acc_Loop --
--------------
when Pragma_Acc_Loop => Acc_Loop : declare
Clause_Names : constant Name_List := (
Name_Auto,
Name_Collapse,
Name_Gang,
Name_Independent,
Name_Acc_Private,
Name_Reduction,
Name_Seq,
Name_Tile,
Name_Vector,
Name_Worker
);
Clauses : Args_List (Clause_Names'Range);
Clause : Node_Id;
Parent_Node : Node_Id;
begin
if not OpenAcc_Enabled then
return;
end if;
GNAT_Pragma;
-- Make sure the pragma is in an openacc construct
Check_Loop_Pragma_Placement;
Parent_Node := Parent (N);
while Present (Parent_Node) and then
(Nkind (Parent_Node) /= N_Loop_Statement or else
not Is_OpenAcc_Environment (Parent_Node)) loop
Parent_Node := Parent (Parent_Node);
end loop;
if not Is_OpenAcc_Environment (Parent_Node) then
Error_Pragma ("Acc_Loop directive must be associated with an " &
"OpenAcc construct region");
end if;
Gather_Associations (Clause_Names, Clauses);
for Id in Clause_Names'First .. Clause_Names'Last loop
Clause := Clauses (Id);
if Present (Clause) then
case Clause_Names (Id) is
when Name_Auto | Name_Independent | Name_Seq => null;
when Name_Collapse =>
Validate_Acc_Loop_Collapse (Clause);
when Name_Gang => Validate_Acc_Loop_Gang (Clause);
when Name_Acc_Private =>
Validate_Acc_Data_Clause (Clause);
when Name_Reduction =>
Validate_Acc_Name_Reduction (Clause);
when Name_Tile => Validate_Acc_Size_Expressions (Clause);
when Name_Vector => Validate_Acc_Loop_Vector (Clause);
when Name_Worker => Validate_Acc_Loop_Worker (Clause);
when others => raise Program_Error;
end case;
end if;
end loop;
Set_Is_OpenAcc_Loop (Parent (N));
end Acc_Loop;
----------------------------------
-- Acc_Parallel and Acc_Kernels --
----------------------------------
when Pragma_Acc_Parallel | Pragma_Acc_Kernels =>
Acc_Kernels_Or_Parallel :
declare
Clause_Names : constant Name_List := (
Name_Acc_If,
Name_Async,
Name_Copy,
Name_Copy_In,
Name_Copy_Out,
Name_Create,
Name_Default,
Name_Device_Ptr,
Name_Device_Type,
Name_Num_Gangs,
Name_Num_Workers,
Name_Present,
Name_Vector_Length,
Name_Wait,
-- Parallel only
Name_Acc_Private,
Name_First_Private,
Name_Reduction,
-- Kernels only
Name_Attach,
Name_No_Create
);
Clauses : Args_List (Clause_Names'Range);
Clause : Node_Id;
begin
if not OpenAcc_Enabled then
return;
end if;
GNAT_Pragma;
Check_Loop_Pragma_Placement;
if Nkind (Parent (N)) /= N_Loop_Statement then
Error_Pragma ("Pragma should be placed in loop or block "
& "statements.");
end if;
Gather_Associations (Clause_Names, Clauses);
for Id in Clause_Names'First .. Clause_Names'Last loop
Clause := Clauses (Id);
if Present (Clause) then
if Chars (Parent (Clause)) = No_Name then
Error_Pragma ("All arguments should be associations");
else
case Clause_Names (Id) is
-- Note: According to the OpenAcc Standard v2.6,
-- Async's argument should be optional. Because
-- this complicates parsing the clause, the
-- argument is made mandatory. The standard defines
-- two negative values, acc_async_noval and
-- acc_async_sync. When given acc_async_noval as
-- value, the clause should behave as if no
-- argument was given. According to the standard,
-- acc_async_noval is defined in header files for C
-- and Fortran, thus this value should probably be
-- defined in the OpenAcc Ada library once it is
-- implemented.
when Name_Async
| Name_Num_Gangs
| Name_Num_Workers
| Name_Vector_Length =>
Validate_Acc_Int_Expr_Clause (Clause);
when Name_Acc_If =>
Validate_Acc_Condition_Clause (Clause);
-- Unsupported by GCC
when Name_Attach
| Name_No_Create =>
Error_Pragma ("Unsupported clause.");
when Name_First_Private
| Name_Acc_Private =>
if Prag_Id /= Pragma_Acc_Parallel then
Error_Pragma ("Argument is only available for" &
" 'Parallel' construct.");
else
Validate_Acc_Data_Clause (Clause);
end if;
when Name_Copy
| Name_Copy_In
| Name_Copy_Out
| Name_Present
| Name_Create
| Name_Device_Ptr =>
Validate_Acc_Data_Clause (Clause);
when Name_Reduction =>
if Prag_Id /= Pragma_Acc_Parallel then
Error_Pragma ("Argument is only available for" &
" 'Parallel' construct.");
else
Validate_Acc_Name_Reduction (Clause);
end if;
when Name_Default =>
if Chars (Clause) /= Name_None then
Error_Pragma ("Expected None");
end if;
when Name_Device_Type =>
Error_Pragma ("Unsupported pragma clause");
-- Same as for Name_Async, Name_Wait's arguments
-- should be optional. However, this can be
-- simulated using acc_async_noval, hence, we do
-- not bother making the argument optional for now.
when Name_Wait =>
Validate_Acc_Int_Expr_List_Clause (Clause);
when others => raise Program_Error;
end case;
end if;
end if;
end loop;
Set_Is_OpenAcc_Environment (Parent (N));
end Acc_Kernels_Or_Parallel;
------------
-- Ada_83 --
------------
......@@ -30117,6 +30694,10 @@ package body Sem_Prag is
Sig_Flags : constant array (Pragma_Id) of Int :=
(Pragma_Abort_Defer => -1,
Pragma_Abstract_State => -1,
Pragma_Acc_Data => 0,
Pragma_Acc_Kernels => 0,
Pragma_Acc_Loop => 0,
Pragma_Acc_Parallel => 0,
Pragma_Ada_83 => -1,
Pragma_Ada_95 => -1,
Pragma_Ada_05 => -1,
......@@ -2069,6 +2069,22 @@ package body Sinfo is
return Flag16 (N);
end Is_Null_Loop;
function Is_OpenAcc_Environment
(N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Loop_Statement);
return Flag13 (N);
end Is_OpenAcc_Environment;
function Is_OpenAcc_Loop
(N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Loop_Statement);
return Flag14 (N);
end Is_OpenAcc_Loop;
function Is_Overloaded
(N : Node_Id) return Boolean is
begin
......@@ -5527,6 +5543,22 @@ package body Sinfo is
Set_Flag16 (N, Val);
end Set_Is_Null_Loop;
procedure Set_Is_OpenAcc_Environment
(N : Node_Id; Val : Boolean := True) is
begin
pragma Assert (False
or else NT (N).Nkind = N_Loop_Statement);
Set_Flag13 (N, Val);
end Set_Is_OpenAcc_Environment;
procedure Set_Is_OpenAcc_Loop
(N : Node_Id; Val : Boolean := True) is
begin
pragma Assert (False
or else NT (N).Nkind = N_Loop_Statement);
Set_Flag14 (N, Val);
end Set_Is_OpenAcc_Loop;
procedure Set_Is_Overloaded
(N : Node_Id; Val : Boolean := True) is
begin
......
......@@ -1896,6 +1896,14 @@ package Sinfo is
-- can be determined to be null at compile time. This is used to remove
-- the loop entirely at expansion time.
-- Is_OpenAcc_Environment (Flag13-Sem)
-- This flag is set in an N_Loop_Statement node if it contains an
-- Acc_Data, Acc_Parallel or Add_Kernels pragma.
-- Is_OpenAcc_Loop (Flag14-Sem)
-- This flag is set in an N_Loop_Statement node if it contains an
-- OpenAcc_Loop pragma.
-- Is_Overloaded (Flag5-Sem)
-- A flag present in all expression nodes. Used temporarily during
-- overloading determination. The setting of this flag is not relevant
......@@ -5129,6 +5137,8 @@ package Sinfo is
-- Has_Created_Identifier (Flag15)
-- Is_Null_Loop (Flag16)
-- Suppress_Loop_Warnings (Flag17)
-- Is_OpenAcc_Environment (Flag13-Sem)
-- Is_OpenAcc_Loop (Flag14-Sem)
-- Note: the parser fills in the Identifier field if there is an
-- explicit loop identifier. Otherwise the parser leaves this field
......@@ -9847,6 +9857,12 @@ package Sinfo is
function Is_Null_Loop
(N : Node_Id) return Boolean; -- Flag16
function Is_OpenAcc_Environment
(N : Node_Id) return Boolean; -- Flag13
function Is_OpenAcc_Loop
(N : Node_Id) return Boolean; -- Flag14
function Is_Overloaded
(N : Node_Id) return Boolean; -- Flag5
......@@ -10945,6 +10961,12 @@ package Sinfo is
procedure Set_Is_Null_Loop
(N : Node_Id; Val : Boolean := True); -- Flag16
procedure Set_Is_OpenAcc_Environment
(N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_OpenAcc_Loop
(N : Node_Id; Val : Boolean := True); -- Flag14
procedure Set_Is_Overloaded
(N : Node_Id; Val : Boolean := True); -- Flag5
......@@ -13450,6 +13472,8 @@ package Sinfo is
pragma Inline (Is_Known_Guaranteed_ABE);
pragma Inline (Is_Machine_Number);
pragma Inline (Is_Null_Loop);
pragma Inline (Is_OpenAcc_Environment);
pragma Inline (Is_OpenAcc_Loop);
pragma Inline (Is_Overloaded);
pragma Inline (Is_Power_Of_2_For_Shift);
pragma Inline (Is_Prefixed_Call);
......@@ -13812,6 +13836,8 @@ package Sinfo is
pragma Inline (Set_Is_Known_Guaranteed_ABE);
pragma Inline (Set_Is_Machine_Number);
pragma Inline (Set_Is_Null_Loop);
pragma Inline (Set_Is_OpenAcc_Environment);
pragma Inline (Set_Is_OpenAcc_Loop);
pragma Inline (Set_Is_Overloaded);
pragma Inline (Set_Is_Power_Of_2_For_Shift);
pragma Inline (Set_Is_Prefixed_Call);
......
......@@ -480,6 +480,10 @@ package Snames is
Name_Abort_Defer : constant Name_Id := N + $; -- GNAT
Name_Abstract_State : constant Name_Id := N + $; -- GNAT
Name_Acc_Data : constant Name_Id := N + $;
Name_Acc_Kernels : constant Name_Id := N + $;
Name_Acc_Loop : constant Name_Id := N + $;
Name_Acc_Parallel : constant Name_Id := N + $;
Name_All_Calls_Remote : constant Name_Id := N + $;
Name_Assert : constant Name_Id := N + $; -- Ada 05
Name_Assert_And_Cut : constant Name_Id := N + $; -- GNAT
......@@ -860,6 +864,34 @@ package Snames is
Name_Warn : constant Name_Id := N + $;
Name_Working_Storage : constant Name_Id := N + $;
-- OpenAcc-specific clause names
-- Parallel, Kernels, Data
Name_Acc_If : constant Name_Id := N + $;
Name_Acc_Private : constant Name_Id := N + $;
Name_Attach : constant Name_Id := N + $;
Name_Copy_In : constant Name_Id := N + $;
Name_Copy_Out : constant Name_Id := N + $;
Name_Create : constant Name_Id := N + $;
Name_Delete : constant Name_Id := N + $;
Name_Detach : constant Name_Id := N + $;
Name_Device_Ptr : constant Name_Id := N + $;
Name_Device_Type : constant Name_Id := N + $;
Name_First_Private : constant Name_Id := N + $;
Name_No_Create : constant Name_Id := N + $;
Name_Num_Gangs : constant Name_Id := N + $;
Name_Num_Workers : constant Name_Id := N + $;
Name_Present : constant Name_Id := N + $;
Name_Reduction : constant Name_Id := N + $;
Name_Vector_Length : constant Name_Id := N + $;
Name_Wait : constant Name_Id := N + $;
-- Loop
Name_Collapse : constant Name_Id := N + $;
Name_Gang : constant Name_Id := N + $;
Name_Worker : constant Name_Id := N + $;
Name_Seq : constant Name_Id := N + $;
Name_Auto : constant Name_Id := N + $;
Name_Tile : constant Name_Id := N + $;
-- Names of recognized attributes. The entries with the comment "Ada 83"
-- are attributes that are defined in Ada 83, but not in Ada 95. These
-- attributes are implemented in all Ada modes in GNAT.
......@@ -1310,172 +1342,172 @@ package Snames is
-- Names with a -- GB annotation are only used in gprbuild or gprclean
Name_Active : constant Name_Id := N + $;
Name_Aggregate : constant Name_Id := N + $;
Name_Archive_Builder : constant Name_Id := N + $;
Name_Archive_Builder_Append_Option : constant Name_Id := N + $;
Name_Archive_Indexer : constant Name_Id := N + $;
Name_Archive_Suffix : constant Name_Id := N + $;
Name_Artifacts : constant Name_Id := N + $;
Name_Artifacts_In_Exec_Dir : constant Name_Id := N + $; -- GB
Name_Artifacts_In_Object_Dir : constant Name_Id := N + $; -- GB
Name_Binder : constant Name_Id := N + $;
Name_Body_Suffix : constant Name_Id := N + $;
Name_Builder : constant Name_Id := N + $;
Name_Clean : constant Name_Id := N + $;
Name_Compiler : constant Name_Id := N + $;
Name_Compiler_Command : constant Name_Id := N + $; -- GB
Name_Config_Body_File_Name : constant Name_Id := N + $;
Name_Config_Body_File_Name_Index : constant Name_Id := N + $;
Name_Config_Body_File_Name_Pattern : constant Name_Id := N + $;
Name_Config_File_Switches : constant Name_Id := N + $;
Name_Config_File_Unique : constant Name_Id := N + $;
Name_Config_Spec_File_Name : constant Name_Id := N + $;
Name_Config_Spec_File_Name_Index : constant Name_Id := N + $;
Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + $;
Name_Configuration : constant Name_Id := N + $;
Name_Cross_Reference : constant Name_Id := N + $;
Name_Default_Language : constant Name_Id := N + $;
Name_Default_Switches : constant Name_Id := N + $;
Name_Dependency_Driver : constant Name_Id := N + $;
Name_Dependency_Kind : constant Name_Id := N + $;
Name_Dependency_Switches : constant Name_Id := N + $;
Name_Driver : constant Name_Id := N + $;
Name_Excluded_Source_Dirs : constant Name_Id := N + $;
Name_Excluded_Source_Files : constant Name_Id := N + $;
Name_Excluded_Source_List_File : constant Name_Id := N + $;
Name_Exec_Dir : constant Name_Id := N + $;
Name_Exec_Subdir : constant Name_Id := N + $;
Name_Excluded_Patterns : constant Name_Id := N + $;
Name_Executable : constant Name_Id := N + $;
Name_Executable_Suffix : constant Name_Id := N + $;
Name_Extends : constant Name_Id := N + $;
Name_External_As_List : constant Name_Id := N + $;
Name_Externally_Built : constant Name_Id := N + $;
Name_Finder : constant Name_Id := N + $;
Name_Global_Compilation_Switches : constant Name_Id := N + $;
Name_Global_Configuration_Pragmas : constant Name_Id := N + $;
Name_Global_Config_File : constant Name_Id := N + $; -- GB
Name_Gnatls : constant Name_Id := N + $;
Name_Gnatstub : constant Name_Id := N + $;
Name_Gnu : constant Name_Id := N + $;
Name_Ide : constant Name_Id := N + $;
Name_Ignore_Source_Sub_Dirs : constant Name_Id := N + $;
Name_Implementation : constant Name_Id := N + $;
Name_Implementation_Exceptions : constant Name_Id := N + $;
Name_Implementation_Suffix : constant Name_Id := N + $;
Name_Included_Artifact_Patterns : constant Name_Id := N + $;
Name_Included_Patterns : constant Name_Id := N + $;
Name_Include_Switches : constant Name_Id := N + $;
Name_Include_Path : constant Name_Id := N + $;
Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Install : constant Name_Id := N + $;
Name_Install_Name : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $;
Name_Leading_Library_Options : constant Name_Id := N + $;
Name_Leading_Required_Switches : constant Name_Id := N + $;
Name_Leading_Switches : constant Name_Id := N + $;
Name_Lib_Subdir : constant Name_Id := N + $;
Name_Link_Lib_Subdir : constant Name_Id := N + $;
Name_Library : constant Name_Id := N + $;
Name_Library_Ali_Dir : constant Name_Id := N + $;
Name_Library_Auto_Init : constant Name_Id := N + $;
Name_Library_Auto_Init_Supported : constant Name_Id := N + $;
Name_Library_Builder : constant Name_Id := N + $;
Name_Library_Dir : constant Name_Id := N + $;
Name_Library_GCC : constant Name_Id := N + $;
Name_Library_Install_Name_Option : constant Name_Id := N + $;
Name_Library_Interface : constant Name_Id := N + $;
Name_Library_Kind : constant Name_Id := N + $;
Name_Library_Name : constant Name_Id := N + $;
Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + $;
Name_Library_Options : constant Name_Id := N + $;
Name_Library_Partial_Linker : constant Name_Id := N + $;
Name_Library_Reference_Symbol_File : constant Name_Id := N + $;
Name_Library_Rpath_Options : constant Name_Id := N + $; -- GB
Name_Library_Standalone : constant Name_Id := N + $;
Name_Library_Encapsulated_Options : constant Name_Id := N + $; -- GB
Name_Library_Encapsulated_Supported : constant Name_Id := N + $; -- GB
Name_Library_Src_Dir : constant Name_Id := N + $;
Name_Library_Support : constant Name_Id := N + $;
Name_Library_Symbol_File : constant Name_Id := N + $;
Name_Library_Symbol_Policy : constant Name_Id := N + $;
Name_Library_Version : constant Name_Id := N + $;
Name_Library_Version_Switches : constant Name_Id := N + $;
Name_Linker : constant Name_Id := N + $;
Name_Linker_Executable_Option : constant Name_Id := N + $;
Name_Linker_Lib_Dir_Option : constant Name_Id := N + $;
Name_Linker_Lib_Name_Option : constant Name_Id := N + $;
Name_Local_Config_File : constant Name_Id := N + $; -- GB
Name_Local_Configuration_Pragmas : constant Name_Id := N + $;
Name_Locally_Removed_Files : constant Name_Id := N + $;
Name_Map_File_Option : constant Name_Id := N + $;
Name_Mapping_File_Switches : constant Name_Id := N + $;
Name_Mapping_Spec_Suffix : constant Name_Id := N + $;
Name_Mapping_Body_Suffix : constant Name_Id := N + $;
Name_Max_Command_Line_Length : constant Name_Id := N + $;
Name_Metrics : constant Name_Id := N + $;
Name_Multi_Unit_Object_Separator : constant Name_Id := N + $;
Name_Multi_Unit_Switches : constant Name_Id := N + $;
Name_Naming : constant Name_Id := N + $;
Name_None : constant Name_Id := N + $;
Name_Object_Artifact_Extensions : constant Name_Id := N + $;
Name_Object_File_Suffix : constant Name_Id := N + $;
Name_Object_File_Switches : constant Name_Id := N + $;
Name_Object_Generated : constant Name_Id := N + $;
Name_Object_List : constant Name_Id := N + $;
Name_Object_Path_Switches : constant Name_Id := N + $;
Name_Objects_Linked : constant Name_Id := N + $;
Name_Objects_Path : constant Name_Id := N + $;
Name_Objects_Path_File : constant Name_Id := N + $;
Name_Object_Dir : constant Name_Id := N + $;
Name_Option_List : constant Name_Id := N + $;
Name_Path_Syntax : constant Name_Id := N + $;
Name_Pic_Option : constant Name_Id := N + $;
Name_Pretty_Printer : constant Name_Id := N + $;
Name_Prefix : constant Name_Id := N + $;
Name_Project : constant Name_Id := N + $;
Name_Project_Dir : constant Name_Id := N + $;
Name_Project_Files : constant Name_Id := N + $;
Name_Project_Path : constant Name_Id := N + $;
Name_Project_Subdir : constant Name_Id := N + $;
Name_Remote : constant Name_Id := N + $;
Name_Required_Artifacts : constant Name_Id := N + $;
Name_Response_File_Format : constant Name_Id := N + $;
Name_Response_File_Switches : constant Name_Id := N + $;
Name_Root_Dir : constant Name_Id := N + $;
Name_Roots : constant Name_Id := N + $; -- GB
Name_Required_Switches : constant Name_Id := N + $;
Name_Run_Path_Option : constant Name_Id := N + $;
Name_Run_Path_Origin : constant Name_Id := N + $;
Name_Separate_Run_Path_Options : constant Name_Id := N + $;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + $;
Name_Shared_Library_Prefix : constant Name_Id := N + $;
Name_Shared_Library_Suffix : constant Name_Id := N + $;
Name_Separate_Suffix : constant Name_Id := N + $;
Name_Source_Artifact_Extensions : constant Name_Id := N + $;
Name_Source_Dirs : constant Name_Id := N + $;
Name_Source_File_Switches : constant Name_Id := N + $;
Name_Source_Files : constant Name_Id := N + $;
Name_Source_List_File : constant Name_Id := N + $;
Name_Sources_Subdir : constant Name_Id := N + $;
Name_Spec : constant Name_Id := N + $;
Name_Spec_Suffix : constant Name_Id := N + $;
Name_Specification : constant Name_Id := N + $;
Name_Specification_Exceptions : constant Name_Id := N + $;
Name_Specification_Suffix : constant Name_Id := N + $;
Name_Stack : constant Name_Id := N + $;
Name_Switches : constant Name_Id := N + $;
Name_Symbolic_Link_Supported : constant Name_Id := N + $;
Name_Synchronize : constant Name_Id := N + $;
Name_Toolchain_Description : constant Name_Id := N + $;
Name_Toolchain_Version : constant Name_Id := N + $;
Name_Trailing_Required_Switches : constant Name_Id := N + $;
Name_Trailing_Switches : constant Name_Id := N + $;
Name_Runtime_Library_Dir : constant Name_Id := N + $;
Name_Runtime_Source_Dir : constant Name_Id := N + $;
Name_Active : constant Name_Id := N + $;
Name_Aggregate : constant Name_Id := N + $;
Name_Archive_Builder : constant Name_Id := N + $;
Name_Archive_Builder_Append_Option : constant Name_Id := N + $;
Name_Archive_Indexer : constant Name_Id := N + $;
Name_Archive_Suffix : constant Name_Id := N + $;
Name_Artifacts : constant Name_Id := N + $;
Name_Artifacts_In_Exec_Dir : constant Name_Id := N + $; -- GB
Name_Artifacts_In_Object_Dir : constant Name_Id := N + $; -- GB
Name_Binder : constant Name_Id := N + $;
Name_Body_Suffix : constant Name_Id := N + $;
Name_Builder : constant Name_Id := N + $;
Name_Clean : constant Name_Id := N + $;
Name_Compiler : constant Name_Id := N + $;
Name_Compiler_Command : constant Name_Id := N + $; -- GB
Name_Config_Body_File_Name : constant Name_Id := N + $;
Name_Config_Body_File_Name_Index : constant Name_Id := N + $;
Name_Config_Body_File_Name_Pattern : constant Name_Id := N + $;
Name_Config_File_Switches : constant Name_Id := N + $;
Name_Config_File_Unique : constant Name_Id := N + $;
Name_Config_Spec_File_Name : constant Name_Id := N + $;
Name_Config_Spec_File_Name_Index : constant Name_Id := N + $;
Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + $;
Name_Configuration : constant Name_Id := N + $;
Name_Cross_Reference : constant Name_Id := N + $;
Name_Default_Language : constant Name_Id := N + $;
Name_Default_Switches : constant Name_Id := N + $;
Name_Dependency_Driver : constant Name_Id := N + $;
Name_Dependency_Kind : constant Name_Id := N + $;
Name_Dependency_Switches : constant Name_Id := N + $;
Name_Driver : constant Name_Id := N + $;
Name_Excluded_Source_Dirs : constant Name_Id := N + $;
Name_Excluded_Source_Files : constant Name_Id := N + $;
Name_Excluded_Source_List_File : constant Name_Id := N + $;
Name_Exec_Dir : constant Name_Id := N + $;
Name_Exec_Subdir : constant Name_Id := N + $;
Name_Excluded_Patterns : constant Name_Id := N + $;
Name_Executable : constant Name_Id := N + $;
Name_Executable_Suffix : constant Name_Id := N + $;
Name_Extends : constant Name_Id := N + $;
Name_External_As_List : constant Name_Id := N + $;
Name_Externally_Built : constant Name_Id := N + $;
Name_Finder : constant Name_Id := N + $;
Name_Global_Compilation_Switches : constant Name_Id := N + $;
Name_Global_Configuration_Pragmas : constant Name_Id := N + $;
Name_Global_Config_File : constant Name_Id := N + $; -- GB
Name_Gnatls : constant Name_Id := N + $;
Name_Gnatstub : constant Name_Id := N + $;
Name_Gnu : constant Name_Id := N + $;
Name_Ide : constant Name_Id := N + $;
Name_Ignore_Source_Sub_Dirs : constant Name_Id := N + $;
Name_Implementation : constant Name_Id := N + $;
Name_Implementation_Exceptions : constant Name_Id := N + $;
Name_Implementation_Suffix : constant Name_Id := N + $;
Name_Included_Artifact_Patterns : constant Name_Id := N + $;
Name_Included_Patterns : constant Name_Id := N + $;
Name_Include_Switches : constant Name_Id := N + $;
Name_Include_Path : constant Name_Id := N + $;
Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Install : constant Name_Id := N + $;
Name_Install_Name : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $;
Name_Leading_Library_Options : constant Name_Id := N + $;
Name_Leading_Required_Switches : constant Name_Id := N + $;
Name_Leading_Switches : constant Name_Id := N + $;
Name_Lib_Subdir : constant Name_Id := N + $;
Name_Link_Lib_Subdir : constant Name_Id := N + $;
Name_Library : constant Name_Id := N + $;
Name_Library_Ali_Dir : constant Name_Id := N + $;
Name_Library_Auto_Init : constant Name_Id := N + $;
Name_Library_Auto_Init_Supported : constant Name_Id := N + $;
Name_Library_Builder : constant Name_Id := N + $;
Name_Library_Dir : constant Name_Id := N + $;
Name_Library_GCC : constant Name_Id := N + $;
Name_Library_Install_Name_Option : constant Name_Id := N + $;
Name_Library_Interface : constant Name_Id := N + $;
Name_Library_Kind : constant Name_Id := N + $;
Name_Library_Name : constant Name_Id := N + $;
Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + $;
Name_Library_Options : constant Name_Id := N + $;
Name_Library_Partial_Linker : constant Name_Id := N + $;
Name_Library_Reference_Symbol_File : constant Name_Id := N + $;
Name_Library_Rpath_Options : constant Name_Id := N + $; -- GB
Name_Library_Standalone : constant Name_Id := N + $;
Name_Library_Encapsulated_Options : constant Name_Id := N + $; -- GB
Name_Library_Encapsulated_Supported : constant Name_Id := N + $; -- GB
Name_Library_Src_Dir : constant Name_Id := N + $;
Name_Library_Support : constant Name_Id := N + $;
Name_Library_Symbol_File : constant Name_Id := N + $;
Name_Library_Symbol_Policy : constant Name_Id := N + $;
Name_Library_Version : constant Name_Id := N + $;
Name_Library_Version_Switches : constant Name_Id := N + $;
Name_Linker : constant Name_Id := N + $;
Name_Linker_Executable_Option : constant Name_Id := N + $;
Name_Linker_Lib_Dir_Option : constant Name_Id := N + $;
Name_Linker_Lib_Name_Option : constant Name_Id := N + $;
Name_Local_Config_File : constant Name_Id := N + $; -- GB
Name_Local_Configuration_Pragmas : constant Name_Id := N + $;
Name_Locally_Removed_Files : constant Name_Id := N + $;
Name_Map_File_Option : constant Name_Id := N + $;
Name_Mapping_File_Switches : constant Name_Id := N + $;
Name_Mapping_Spec_Suffix : constant Name_Id := N + $;
Name_Mapping_Body_Suffix : constant Name_Id := N + $;
Name_Max_Command_Line_Length : constant Name_Id := N + $;
Name_Metrics : constant Name_Id := N + $;
Name_Multi_Unit_Object_Separator : constant Name_Id := N + $;
Name_Multi_Unit_Switches : constant Name_Id := N + $;
Name_Naming : constant Name_Id := N + $;
Name_None : constant Name_Id := N + $;
Name_Object_Artifact_Extensions : constant Name_Id := N + $;
Name_Object_File_Suffix : constant Name_Id := N + $;
Name_Object_File_Switches : constant Name_Id := N + $;
Name_Object_Generated : constant Name_Id := N + $;
Name_Object_List : constant Name_Id := N + $;
Name_Object_Path_Switches : constant Name_Id := N + $;
Name_Objects_Linked : constant Name_Id := N + $;
Name_Objects_Path : constant Name_Id := N + $;
Name_Objects_Path_File : constant Name_Id := N + $;
Name_Object_Dir : constant Name_Id := N + $;
Name_Option_List : constant Name_Id := N + $;
Name_Path_Syntax : constant Name_Id := N + $;
Name_Pic_Option : constant Name_Id := N + $;
Name_Pretty_Printer : constant Name_Id := N + $;
Name_Prefix : constant Name_Id := N + $;
Name_Project : constant Name_Id := N + $;
Name_Project_Dir : constant Name_Id := N + $;
Name_Project_Files : constant Name_Id := N + $;
Name_Project_Path : constant Name_Id := N + $;
Name_Project_Subdir : constant Name_Id := N + $;
Name_Remote : constant Name_Id := N + $;
Name_Required_Artifacts : constant Name_Id := N + $;
Name_Response_File_Format : constant Name_Id := N + $;
Name_Response_File_Switches : constant Name_Id := N + $;
Name_Root_Dir : constant Name_Id := N + $;
Name_Roots : constant Name_Id := N + $; -- GB
Name_Required_Switches : constant Name_Id := N + $;
Name_Run_Path_Option : constant Name_Id := N + $;
Name_Run_Path_Origin : constant Name_Id := N + $;
Name_Separate_Run_Path_Options : constant Name_Id := N + $;
Name_Shared_Library_Minimum_Switches : constant Name_Id := N + $;
Name_Shared_Library_Prefix : constant Name_Id := N + $;
Name_Shared_Library_Suffix : constant Name_Id := N + $;
Name_Separate_Suffix : constant Name_Id := N + $;
Name_Source_Artifact_Extensions : constant Name_Id := N + $;
Name_Source_Dirs : constant Name_Id := N + $;
Name_Source_File_Switches : constant Name_Id := N + $;
Name_Source_Files : constant Name_Id := N + $;
Name_Source_List_File : constant Name_Id := N + $;
Name_Sources_Subdir : constant Name_Id := N + $;
Name_Spec : constant Name_Id := N + $;
Name_Spec_Suffix : constant Name_Id := N + $;
Name_Specification : constant Name_Id := N + $;
Name_Specification_Exceptions : constant Name_Id := N + $;
Name_Specification_Suffix : constant Name_Id := N + $;
Name_Stack : constant Name_Id := N + $;
Name_Switches : constant Name_Id := N + $;
Name_Symbolic_Link_Supported : constant Name_Id := N + $;
Name_Synchronize : constant Name_Id := N + $;
Name_Toolchain_Description : constant Name_Id := N + $;
Name_Toolchain_Version : constant Name_Id := N + $;
Name_Trailing_Required_Switches : constant Name_Id := N + $;
Name_Trailing_Switches : constant Name_Id := N + $;
Name_Runtime_Library_Dir : constant Name_Id := N + $;
Name_Runtime_Source_Dir : constant Name_Id := N + $;
-- Other miscellaneous names used in front end
......@@ -1885,6 +1917,10 @@ package Snames is
Pragma_Abort_Defer,
Pragma_Abstract_State,
Pragma_Acc_Data,
Pragma_Acc_Kernels,
Pragma_Acc_Loop,
Pragma_Acc_Parallel,
Pragma_All_Calls_Remote,
Pragma_Assert,
Pragma_Assert_And_Cut,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment