This patch is part of the ongoing effort to find more SIMD optimization opportunities in OpenMP code. Here we are looking for functions that have the "omp declare target" attribute that are also suitable candidates for automatic SIMD cloning. I've made the filter quite conservative, but maybe it could be improved with some further analysis. I added a command-line flag to disable this in case it is buggy :-P or leads to excessive code bloat without improving performance in some cases, otherwise the SIMD clones are generated in the same way and at the same optimization levels as the existing simdclone pass. I had to modify the TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN hook to add a boolean argument to control diagnostics, since GCC shouldn't complain about types the target doesn't support in cases where the user didn't explicitly ask for clones to be created. I tested on x86_64-linux-gnu-amdgcn, plain x86_64-linux-gnu, and aarch64-linux-gnu to get coverage of all 3 backends that implement this hook. OK for mainline? -Sandra