On Thu, 2019-12-19 at 16:59 +0000, Richard Sandiford wrote:
> Normally we only create SVE ACLE functions when arm_sve.h is included.
> But for LTO we need to do it at start-up, so that the functions are
> already defined when streaming in the LTO objects.
>
> One hitch with doing that is that LTO doesn't yet implement the
> simulate_enum_decl langhook. This patch adds a simple default
> implementation that it can use.
>
> Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK for the
> generic bits?
>
> Richard
>
>
> 2019-12-19 Richard Sandiford <richard.sandif...@arm.com>
>
> gcc/
> * langhooks-def.h (lhd_simulate_enum_decl): Declare.
> (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
> * langhooks.c: Include stor-layout.h.
> (lhd_simulate_enum_decl): New function.
> * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call
> handle_arm_sve_h for the LTO frontend.
> (register_vector_type): Cope with null returns from pushdecl.
>
> gcc/testsuite/
> * gcc.target/aarch64/sve/pcs/asm_4.c: New test.
OK
jeff
>