]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Cleanup and efficiency improvements
authorBob Duff <duff@adacore.com>
Thu, 29 Jul 2021 15:15:46 +0000 (11:15 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 23 Sep 2021 13:06:14 +0000 (13:06 +0000)
commit99e30ba8c01f80a81891223069d47d8a611082c4
tree2bfbbf0e257e54ccf041809b15680cfb8b58c83a
parent7165704bfaae012cb28e5411619218da6fb8320d
[Ada] Cleanup and efficiency improvements

gcc/ada/

* gen_il-gen.adb: Generate getters and setters with much of the
code inlined. Generate code for storing a few fields in the node
header, to avoid the extra level of indirection for those
fields. We generate the header type, so we don't have to
duplicate hand-written Ada and C code to depend on the number of
header fields.  Declare constants for slot size. Use short names
because these are used all over.  Remove
Put_Low_Level_Accessor_Instantiations, Put_Low_Level_C_Getter,
which are no longer needed.  Rename
Put_High_Level_C_Getter-->Put_C_Getter.
* atree.ads, atree.adb: Take into account the header slots.
Take into account the single Node_Or_Entity_Field type.  Remove
"pragma Assertion_Policy (Ignore);", because the routines in
this package are no longer efficiency critical.
* atree.h: Remove low-level getters, which are no longer used by
sinfo.h and einfo.h.
* einfo-utils.adb: Avoid crash in Known_Alignment.
* live.adb, sem_eval.adb: Remove code that prevents Node_Id from
having a predicate.  We don't actually add a predicate to
Node_Id, but we want to be able to for temporary debugging.
* sinfo-utils.adb: Remove code that prevents Node_Id from having
a predicate.  Take into account the single Node_Or_Entity_Field
type.
* sinfo-utils.ads: Minor.
* table.ads (Table_Type): Make the components aliased, because
low-level setters in Atree need to take 'Access.
* treepr.adb: Take into account the single Node_Or_Entity_Field
type.  Make some code more robust, so we can print out
half-baked nodes.
* types.ads: Move types here for visibility purposes.
* gcc-interface/gigi.h, gcc-interface/trans.c: Take into account
the Node_Header change in the GNAT front end.
* gcc-interface/cuintp.c, gcc-interface/targtyps.c: Add because
gigi.h now refers to type Node_Header, which is in sinfo.h.
16 files changed:
gcc/ada/atree.adb
gcc/ada/atree.ads
gcc/ada/atree.h
gcc/ada/einfo-utils.adb
gcc/ada/gcc-interface/cuintp.c
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/targtyps.c
gcc/ada/gcc-interface/trans.c
gcc/ada/gen_il-gen.adb
gcc/ada/live.adb
gcc/ada/sem_eval.adb
gcc/ada/sinfo-utils.adb
gcc/ada/sinfo-utils.ads
gcc/ada/table.ads
gcc/ada/treepr.adb
gcc/ada/types.ads