aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/debug.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-08-09 19:06:18 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-01 06:13:36 +0000
commita6fe12b0a9a375e655945ff385810661d8bb494c (patch)
tree56f4b101a3296d6c88ae641309ba536ebbd728be /gcc/ada/debug.adb
parente0ab2003576fd34f37afbf5cd39d714b261f3f05 (diff)
downloadgcc-a6fe12b0a9a375e655945ff385810661d8bb494c.zip
gcc-a6fe12b0a9a375e655945ff385810661d8bb494c.tar.gz
gcc-a6fe12b0a9a375e655945ff385810661d8bb494c.tar.bz2
[Ada] Info. gathering in preparation for more efficiency improvements
gcc/ada/ * atree.adb: Gather and print statistics about frequency of getter and setter calls. * atree.ads (Print_Statistics): New procedure for printing statistics. * debug.adb: Document -gnatd.A switch. * gen_il-gen.adb: Generate code for statistics gathering. Choose the offset of Homonym early. Misc cleanup. Put more comments in the generated code. * gen_il-internals.ads (Unknown_Offset): New value to indicate that the offset has not yet been chosen. * gnat1drv.adb: Call Print_Statistics. * libgnat/s-imglli.ads: Minor comment fix. * output.ads (Write_Int_64): New procedure to write a 64-bit value. Needed for new statistics, and could come in handy elsewhere. * output.adb (Write_Int_64): Likewise. * sinfo.ads: Remove obsolete comment. The xtreeprs program no longer exists. * types.ads: New 64-bit types needed for new statistics.
Diffstat (limited to 'gcc/ada/debug.adb')
-rw-r--r--gcc/ada/debug.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 5245feb3..a7cdfae 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -112,7 +112,7 @@ package body Debug is
-- d.y Disable implicit pragma Elaborate_All on task bodies
-- d.z Restore previous support for frontend handling of Inline_Always
- -- d.A
+ -- d.A Enable statistics printing in Atree
-- d.B Generate a bug box on abort_statement
-- d.C Generate concatenation call, do not generate inline code
-- d.D Disable errors on use of overriding keyword in Ada 95 mode
@@ -830,6 +830,10 @@ package body Debug is
-- handling of Inline_Always by the front end on such targets. For the
-- targets that do not use the GCC back end, this switch is ignored.
+ -- d.A Enable statistics printing in Atree. First set Statistics_Enabled
+ -- in gen_il-gen.adb to True, then rebuild, then run the compiler with
+ -- -gnatd.A. You might want to apply "sort -nr" to the output.
+
-- d.B Generate a bug box when we see an abort_statement, even though
-- there is no bug. Useful for testing Comperr.Compiler_Abort: write
-- some code containing an abort_statement, and compile it with