aboutsummaryrefslogtreecommitdiff
path: root/libobjc/exception.c
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-10-17 16:28:20 +0200
committerMarc Poulhiès <poulhies@adacore.com>2022-11-07 09:36:34 +0100
commit9b07c1752b9bf49143a41c810e2db86f633fdb1c (patch)
tree1a88ecd0593dcefa518315dbf6960ad2bf01c8b8 /libobjc/exception.c
parent27345558cce16e849884f5d1d4dd7d88974bb724 (diff)
downloadgcc-9b07c1752b9bf49143a41c810e2db86f633fdb1c.zip
gcc-9b07c1752b9bf49143a41c810e2db86f633fdb1c.tar.gz
gcc-9b07c1752b9bf49143a41c810e2db86f633fdb1c.tar.bz2
ada: Inline composite node kind AST queries
Queries that ultimately examine the same field of an AST node (e.g. Nkind) are visibly more efficient when inlined. In particular, routines Is_Body_Or_Package_Declaration and Is_Body can apparently be inlined into a single Nkind membership test. This patch fixes some of the performance lost with the recent changes, which increased the number of calls to Is_Body_Or_Package_Declaration (as it is typically used to prevent AST search from climbing too far). However, it should be generally beneficial to inline routines like this. gcc/ada/ * sem_aux.ads (Is_Body): Annotate with Inline. * sem_util.ads (Is_Body_Or_Package_Declaration): Likewise.
Diffstat (limited to 'libobjc/exception.c')
0 files changed, 0 insertions, 0 deletions