Make function_code a 32-bit field
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 5 Aug 2019 16:47:04 +0000 (16:47 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 5 Aug 2019 16:47:04 +0000 (16:47 +0000)
commit55f863c4d694deafb968dbf44d08ba49bb7c0766
treeb91b78d2e7f918030c3c7acca8d54fdac5c67f83
parent868363d4f52df19d8d5e9529b8906fa25c8d0c95
Make function_code a 32-bit field

Adding SVE intrinsics on top of the existing AArch64 intrinsics blows
the 12-bit function_code in tree_function_decl.  That bitfield has no
spare bits, but it comes at the end of the structure and is preceded
by a pointer, so on LP64 hosts there's currently a 32-bit hole at end.

This patch therefore makes function_code an independent field and
moves the bitfield to the 32-bit hole.

I wondered about instead making function_code 16 bits, so that the
patch leaves 28 spare bits instead of just 12.  That seemed a bit
short-term though; I can't guarantee that we won't blow 16 bits once
the SVE2 functions are added...

If we run out of bits again, we can start chomping from the top
of the enum.  E.g. 24 bits should surely be enough, but there's
no point paying the overhead of the masking until we need it.

2019-08-05  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-core.h (tree_function_decl): Make function_code an
independent field.  Group the remaining bitfields into bytes
and move decl_type so that it contines to be at a byte boundary.
Leave 12 bits for future expansion.

From-SVN: r274119
gcc/ChangeLog
gcc/tree-core.h