mirror of git://gcc.gnu.org/git/gcc.git
exp_util.adb (Silly_Boolean_Array_Xor_Test): Simplify existing code.
2009-04-09 Robert Dewar <dewar@adacore.com> * exp_util.adb (Silly_Boolean_Array_Xor_Test): Simplify existing code. * atree.h: Add Elist26 * gnat_ugn.texi: Complete documentation deprecating -gnatN for non-gcc backends. From-SVN: r145818
This commit is contained in:
parent
3070bab4c9
commit
f17889b313
|
@ -1,3 +1,12 @@
|
||||||
|
2009-04-09 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* exp_util.adb (Silly_Boolean_Array_Xor_Test): Simplify existing code.
|
||||||
|
|
||||||
|
* atree.h: Add Elist26
|
||||||
|
|
||||||
|
* gnat_ugn.texi: Complete documentation deprecating -gnatN for non-gcc
|
||||||
|
backends.
|
||||||
|
|
||||||
2009-04-09 Javier Miranda <miranda@adacore.com>
|
2009-04-09 Javier Miranda <miranda@adacore.com>
|
||||||
|
|
||||||
* exp_disp.adb (Export_DT): Addition of a new argument (Index); used to
|
* exp_disp.adb (Export_DT): Addition of a new argument (Index); used to
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* *
|
* *
|
||||||
* C Header File *
|
* C Header File *
|
||||||
* *
|
* *
|
||||||
* Copyright (C) 1992-2007, Free Software Foundation, Inc. *
|
* Copyright (C) 1992-2008, Free Software Foundation, Inc. *
|
||||||
* *
|
* *
|
||||||
* GNAT is free software; you can redistribute it and/or modify it under *
|
* GNAT is free software; you can redistribute it and/or modify it under *
|
||||||
* terms of the GNU General Public License as published by the Free Soft- *
|
* terms of the GNU General Public License as published by the Free Soft- *
|
||||||
|
@ -473,6 +473,7 @@ extern Node_Id Current_Error_Node;
|
||||||
#define Elist21(N) Field21 (N)
|
#define Elist21(N) Field21 (N)
|
||||||
#define Elist23(N) Field23 (N)
|
#define Elist23(N) Field23 (N)
|
||||||
#define Elist25(N) Field25 (N)
|
#define Elist25(N) Field25 (N)
|
||||||
|
#define Elist26(N) Field26 (N)
|
||||||
|
|
||||||
#define Name1(N) Field1 (N)
|
#define Name1(N) Field1 (N)
|
||||||
#define Name2(N) Field2 (N)
|
#define Name2(N) Field2 (N)
|
||||||
|
|
|
@ -5147,7 +5147,7 @@ package body Exp_Util is
|
||||||
-- This procedure implements an odd and silly test. We explicitly check
|
-- This procedure implements an odd and silly test. We explicitly check
|
||||||
-- for the XOR case where the component type is True .. True, since this
|
-- for the XOR case where the component type is True .. True, since this
|
||||||
-- will raise constraint error. A special check is required since CE
|
-- will raise constraint error. A special check is required since CE
|
||||||
-- will not be required otherwise (cf Expand_Packed_Not).
|
-- will not be generated otherwise (cf Expand_Packed_Not).
|
||||||
|
|
||||||
-- No such check is required for AND and OR, since for both these cases
|
-- No such check is required for AND and OR, since for both these cases
|
||||||
-- False op False = False, and True op True = True.
|
-- False op False = False, and True op True = True.
|
||||||
|
@ -5155,34 +5155,46 @@ package body Exp_Util is
|
||||||
procedure Silly_Boolean_Array_Xor_Test (N : Node_Id; T : Entity_Id) is
|
procedure Silly_Boolean_Array_Xor_Test (N : Node_Id; T : Entity_Id) is
|
||||||
Loc : constant Source_Ptr := Sloc (N);
|
Loc : constant Source_Ptr := Sloc (N);
|
||||||
CT : constant Entity_Id := Component_Type (T);
|
CT : constant Entity_Id := Component_Type (T);
|
||||||
BT : constant Entity_Id := Base_Type (CT);
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
-- The check we install is
|
||||||
|
|
||||||
|
-- constraint_error when
|
||||||
|
-- Boolean (component_type'First)
|
||||||
|
-- and then Boolean (component_type'Last)
|
||||||
|
-- and then array_type'Length /= 0)
|
||||||
|
|
||||||
|
-- We need the last guard because we don't want to raise CE for empty
|
||||||
|
-- arrays since no out of range values result (Empty arrays with a
|
||||||
|
-- component type of True .. True -- very useful -- even the ACATS
|
||||||
|
-- does not test that marginal case!).
|
||||||
|
|
||||||
Insert_Action (N,
|
Insert_Action (N,
|
||||||
Make_Raise_Constraint_Error (Loc,
|
Make_Raise_Constraint_Error (Loc,
|
||||||
Condition =>
|
Condition =>
|
||||||
Make_Op_And (Loc,
|
Make_And_Then (Loc,
|
||||||
Left_Opnd =>
|
Left_Opnd =>
|
||||||
Make_Op_Eq (Loc,
|
Make_And_Then (Loc,
|
||||||
Left_Opnd =>
|
Left_Opnd =>
|
||||||
Make_Attribute_Reference (Loc,
|
Convert_To (Standard_Boolean,
|
||||||
Prefix => New_Occurrence_Of (CT, Loc),
|
Make_Attribute_Reference (Loc,
|
||||||
Attribute_Name => Name_First),
|
Prefix => New_Occurrence_Of (CT, Loc),
|
||||||
|
Attribute_Name => Name_First)),
|
||||||
|
|
||||||
Right_Opnd =>
|
Right_Opnd =>
|
||||||
Convert_To (BT,
|
Convert_To (Standard_Boolean,
|
||||||
New_Occurrence_Of (Standard_True, Loc))),
|
Make_Attribute_Reference (Loc,
|
||||||
|
Prefix => New_Occurrence_Of (CT, Loc),
|
||||||
|
Attribute_Name => Name_Last))),
|
||||||
|
|
||||||
Right_Opnd =>
|
Right_Opnd =>
|
||||||
Make_Op_Eq (Loc,
|
Make_Op_Ne (Loc,
|
||||||
Left_Opnd =>
|
Left_Opnd =>
|
||||||
Make_Attribute_Reference (Loc,
|
Make_Attribute_Reference (Loc,
|
||||||
Prefix => New_Occurrence_Of (CT, Loc),
|
Prefix => New_Reference_To (T, Loc),
|
||||||
Attribute_Name => Name_Last),
|
Attribute_Name => Name_Length),
|
||||||
|
Right_Opnd => Make_Integer_Literal (Loc, 0))),
|
||||||
|
|
||||||
Right_Opnd =>
|
|
||||||
Convert_To (BT,
|
|
||||||
New_Occurrence_Of (Standard_True, Loc)))),
|
|
||||||
Reason => CE_Range_Check_Failed));
|
Reason => CE_Range_Check_Failed));
|
||||||
end Silly_Boolean_Array_Xor_Test;
|
end Silly_Boolean_Array_Xor_Test;
|
||||||
|
|
||||||
|
|
|
@ -2372,9 +2372,6 @@ The use of @option{-gnatN} activates inlining optimization
|
||||||
that is performed by the front end of the compiler. This inlining does
|
that is performed by the front end of the compiler. This inlining does
|
||||||
not require that the code generation be optimized. Like @option{-gnatn},
|
not require that the code generation be optimized. Like @option{-gnatn},
|
||||||
the use of this switch generates additional dependencies.
|
the use of this switch generates additional dependencies.
|
||||||
Note that
|
|
||||||
@option{-gnatN} automatically implies @option{-gnatn} so it is not necessary
|
|
||||||
to specify both options.
|
|
||||||
|
|
||||||
When using a gcc-based back end (in practice this means using any version
|
When using a gcc-based back end (in practice this means using any version
|
||||||
of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of
|
of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of
|
||||||
|
@ -4014,14 +4011,12 @@ Activate front end inlining for subprograms for which
|
||||||
pragma @code{Inline} is specified. This inlining is performed
|
pragma @code{Inline} is specified. This inlining is performed
|
||||||
by the front end and will be visible in the
|
by the front end and will be visible in the
|
||||||
@option{-gnatG} output.
|
@option{-gnatG} output.
|
||||||
In some cases, this has proved more effective than the back end
|
|
||||||
inlining resulting from the use of
|
When using a gcc-based back end (in practice this means using any version
|
||||||
@option{-gnatn}.
|
of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of
|
||||||
Note that
|
@option{-gnatN} is deprecated, and the use of @option{-gnatn} is preferred.
|
||||||
@option{-gnatN} automatically implies
|
Historically front end inlining was more extensive than the gcc back end
|
||||||
@option{-gnatn} so it is not necessary
|
inlining, but that is no longer the case.
|
||||||
to specify both options. There are a few cases that the back-end inlining
|
|
||||||
catches that cannot be dealt with in the front-end.
|
|
||||||
|
|
||||||
@item -gnato
|
@item -gnato
|
||||||
@cindex @option{-gnato} (@command{gcc})
|
@cindex @option{-gnato} (@command{gcc})
|
||||||
|
@ -6716,12 +6711,14 @@ see @ref{Inlining of Subprograms}.
|
||||||
|
|
||||||
@item -gnatN
|
@item -gnatN
|
||||||
@cindex @option{-gnatN} (@command{gcc})
|
@cindex @option{-gnatN} (@command{gcc})
|
||||||
The front end inlining activated by this switch is generally more extensive,
|
This switch activates front-end inlining which also
|
||||||
and quite often more effective than the standard @option{-gnatn} inlining mode.
|
generates additional dependencies.
|
||||||
It will also generate additional dependencies.
|
|
||||||
Note that
|
When using a gcc-based back end (in practice this means using any version
|
||||||
@option{-gnatN} automatically implies @option{-gnatn} so it is not necessary
|
of GNAT other than the JGNAT, .NET or GNAAMP versions), then the use of
|
||||||
to specify both options.
|
@option{-gnatN} is deprecated, and the use of @option{-gnatn} is preferred.
|
||||||
|
Historically front end inlining was more extensive than the gcc back end
|
||||||
|
inlining, but that is no longer the case.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Auxiliary Output Control
|
@node Auxiliary Output Control
|
||||||
|
|
Loading…
Reference in New Issue