On 24/05/2019 15:31, Richard Sandiford wrote: > Szabolcs Nagy <szabolcs.n...@arm.com> writes: >> +static void >> +aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* >> name) >> +{ >> + if (TREE_CODE (decl) == FUNCTION_DECL >> + && TREE_PUBLIC (decl) >> + && lookup_attribute ("aarch64_vector_pcs", >> + TYPE_ATTRIBUTES (TREE_TYPE (decl)))) >> + { >> + fprintf (stream, "\t.variant_pcs\t"); >> + assemble_name (stream, name); >> + fprintf (stream, "\n"); >> + } >> +} > > What do you think about leaving out the TREE_PUBLIC check? The ABI > doesn't require !TREE_PUBLIC functions to be marked, but it might be > safer to do the same thing for all VPCS functions anyway (especially > since, like you say below, we still mark some things that don't > necessarily need to be marked).
yes, always emitting the directive seems simpler. a use-case where it is preferable to only emit the directive when necessary is when there is no asm support, but we want to use local vector functions. (e.g. static linking could work without asm support if all vector functions are made hidden somehow and emitting the directive is prevented for hidden symbols) but that's not a very strong case. i'll change this and address the other comments.