]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Avoid null-exclusion checks for Node_Field_Table
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 27 Sep 2023 10:19:53 +0000 (12:19 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 6 Jan 2025 09:14:47 +0000 (10:14 +0100)
commit92d50b9d6478d58a99012f3c05bd144b7fcd8937
tree1d3408071e633ebad58b19a38b2d7c63449fdbce
parenta172d6cfa0634d932d30e36636d1bd79ae70c27c
ada: Avoid null-exclusion checks for Node_Field_Table

By generating the type of Node_Field_Table with a "not null" qualifier
we check the null exclusion of its elements only once, at the object
declaration.

Tiny performance improvement for the debug builds (because in production
builds checks are disabled anyway); semantics is unaffected.

gcc/ada/ChangeLog:

* gen_il-gen.adb (Put_Tables): Add "not null" to the generated code.
* rtsfind.adb (Cstring_Ptr): Same for table with predefined RE_Id
error messages.
* impunit.adb (Aunit_Record): Same for array of alternative unit names.
gcc/ada/gen_il-gen.adb
gcc/ada/impunit.adb
gcc/ada/rtsfind.adb