This is the modified version of the second of my Aarch64 SIMD ABI patches. While implementing this functionality I found I wanted targetm.simd_clone.adjust to be called when creating SIMD clone definitions and also when creating SIMD clone declarations. The current implementation (used only by x86) only called this target function when creating clone definitions. I added a second argument to the target function to say if it was creating a definition or a declaration and modified the i386 code to do nothing on declarations, thus maintaining its current behavour. This allowed my to add the aarch64_vector_pcs attribute to SIMD clone declarations and definitions on Aarch64. I considered comparing node->decl and cfun->decl to differentiate between definitions and declarations instead of using a new argument but having an argument seemed cleaner and clearer. Tested on x86 and aarch64. Steve Ellcey sellcey@marvell.com 2018-12-11 Steve Ellcey * config/aarch64/aarch64.c (cgraph.h): New include. (aarch64_simd_clone_compute_vecsize_and_simdlen): New function. (aarch64_simd_clone_adjust): Ditto. (aarch64_simd_clone_usable): Ditto. (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN): New macro. (TARGET_SIMD_CLONE_ADJUST): Ditto. (TARGET_SIMD_CLONE_USABLE): Ditto. * config/i386/i386.c (ix86_simd_clone_adjust): Add new argument. * omp-simd-clone.c (simd_clone_adjust): Add new argument to targetm.simd_clone.adjust call. (expand_simd_clones): Add new targetm.simd_clone.adjust call. * target.def (simd_clone_adjust): Add new argument.