diff options
author | Robert Dewar <dewar@adacore.com> | 2008-03-26 08:36:02 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-03-26 08:36:02 +0100 |
commit | 1b24ada5aba090c1b641353f94cba86730c99105 (patch) | |
tree | 70dbf93da9aba2214e551ac66d758a30077cf351 /gcc/ada/debug.adb | |
parent | 9fbecd1a76ba3508fac12e5795923d6ca9efe309 (diff) | |
download | gcc-1b24ada5aba090c1b641353f94cba86730c99105.zip gcc-1b24ada5aba090c1b641353f94cba86730c99105.tar.gz gcc-1b24ada5aba090c1b641353f94cba86730c99105.tar.bz2 |
ali.ads, ali.adb (Optimize_Alignment_Setting): New field in ALI record
2008-03-26 Robert Dewar <dewar@adacore.com>
* ali.ads, ali.adb (Optimize_Alignment_Setting): New field in ALI record
* bcheck.adb (Check_Consistent_Optimize_Alignment): New procedure
* debug.adb: Add debug flags d.r and d.v
Add debug flag .T (Optimize_Alignment (Time))
Add debug flag .S (Optimize_Alignment (Space))
* freeze.adb (Freeze_Record_Type): Set OK_To_Reorder_Components
depending on setting of relevant debug flags.
Replace use of Warnings_Off by Has_Warnings_Off
(Freeze_Entity): In circuit for warning on suspicious convention
actuals, do not give warning if subprogram has same entity as formal
type, or if subprogram does not come from source.
(Freeze_Entity): Don't reset Is_Packed for fully rep speced record
if Optimize_Alignment set to Space.
* frontend.adb: Add call to Sem_Warn.Initialize
Add call to Sem_Warn.Output_Unused_Warnings_Off_Warnings
Reset Optimize_Alignment mode from debug switches .S and .T
* layout.adb (Layout_Composite_Object): Rewritten for
Optimize_Aligment pragma.
* lib-writ.ads, lib-writ.adb: New Ox parameter for Optimize_Alignment
mode.
* opt.ads, opt.adb: (Optimize_Alignment): New global switch
* par-prag.adb (N_Pragma): Chars field removed, use Chars
(Pragma_Identifier (.. instead, adjustments throughout to accomodate
this change. Add entry for pragma Optimize_Alignment
* sem_prag.adb (N_Pragma): Chars field removed, use Chars
(Pragma_Identifier (..
instead, adjustments throughout to accomodate this change.
(Process_Compile_Time_Warning_Or_Error): Use !! for generated msg
(Favor_Top_Level): Use new function Is_Access_Subprogram_Type
Add implementation of pragma Optimize_Alignment
From-SVN: r133549
Diffstat (limited to 'gcc/ada/debug.adb')
-rw-r--r-- | gcc/ada/debug.adb | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index b4ab4c6..48ff50b 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -93,7 +93,7 @@ package body Debug is -- dY Enable configurable run-time mode -- dZ Generate listing showing the contents of the dispatch tables - -- d.a Disable OpenVMS alignment optimization on types + -- d.a -- d.b -- d.c -- d.d @@ -110,11 +110,11 @@ package body Debug is -- d.o -- d.p -- d.q - -- d.r + -- d.r Enable OK_To_Reorder_Components in non-variant records -- d.s Disable expansion of slice move, use memmove -- d.t Disable static allocation of library level dispatch tables -- d.u - -- d.v + -- d.v Enable OK_To_Reorder_Components in variant records -- d.w Do not check for infinite while loops -- d.x No exception handlers -- d.y @@ -138,8 +138,8 @@ package body Debug is -- d.P -- d.Q -- d.R - -- d.S - -- d.T + -- d.S Force Optimize_Alignment (Space) + -- d.T Force Optimize_Alignment (Time) -- d.U -- d.V -- d.W @@ -474,33 +474,32 @@ package body Debug is -- line has an internally generated number used for references between -- tagged types and primitives. For each primitive the output has the -- following fields: + -- -- - Letter 'P' or letter 's': The former indicates that this -- primitive will be located in a primary dispatch table. The -- latter indicates that it will be located in a secondary -- dispatch table. + -- -- - Name of the primitive. In case of predefined Ada primitives -- the text "(predefined)" is added before the name, and these -- acronyms are used: SR (Stream_Read), SW (Stream_Write), SI -- (Stream_Input), SO (Stream_Output), DA (Deep_Adjust), DF -- (Deep_Finalize). In addition Oeq identifies the equality -- operator, and "_assign" the assignment. + -- -- - If the primitive covers interface types, two extra fields -- referencing other primitives are generated: "Alias" references -- the primitive of the tagged type that covers an interface -- primitive, and "AI_Alias" references the covered interface -- primitive. + -- -- - The expression "at #xx" indicates the slot of the dispatch -- table occupied by such primitive in its corresponding primary -- or secondary dispatch table. + -- -- - In case of abstract subprograms the text "is abstract" is -- added at the end of the line. - -- d.a Disable OpenVMS alignment optimization on types. On OpenVMS, - -- record types whose size is odd "in between" (e.g. 17 bits) are - -- over-aligned to the next power of 2 (until 8 bytes). This over - -- alignment improve generated code and is more consistent with - -- what Dec Ada does. - -- d.f Suppress folding of static expressions. This of course results -- in seriously non-conforming behavior, but is useful sometimes -- when tracking down handling of complex expressions. @@ -520,6 +519,9 @@ package body Debug is -- main source (this corresponds to a previous behavior of -gnatl and -- is used for running the ACATS tests). + -- d.r Forces the flag OK_To_Reorder_Components to be set in all record + -- base types that have no discriminants. + -- d.s Normally the compiler expands slice moves into loops if overlap -- might be possible. This debug flag inhibits that expansion, and -- the back end is expected to use an appropriate routine to handle @@ -531,6 +533,9 @@ package body Debug is -- previous dynamic construction of tables. It is there as a possible -- work around if we run into trouble with the new implementation. + -- d.v Forces the flag OK_To_Reorder_Components to be set in all record + -- base types that have at least one discriminant (v = variant). + -- d.w This flag turns off the scanning of while loops to detect possible -- infinite loops. @@ -543,6 +548,10 @@ package body Debug is -- byte code, even in case of unsupported construct, for the sake -- of static analysis tools. + -- d.S Force Optimize_Alignment (Space) mode as the default + + -- d.T Force Optimize_Alignment (Time) mode as the default + -- d1 Error messages have node numbers where possible. Normally error -- messages have only source locations. This option is useful when -- debugging errors caused by expanded code, where the source location |