On Fri, Oct 7, 2016 at 7:52 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi all, > > This patch uses the spellcheck API from David and Jakub [1] to implement > hints for the > march, mcpu and mtune options to suggest appropriate architectures and CPU > names > for users. It also adds such hints for the equivalent arch, cpu, tune > attributes. > Architecture extensions like 'crc', 'crypto' are not handled in this patch > as they > can be combined and modified with '+no' so it would be quite tricky. But if > a user > misspells those we just give a proper "unknown modifier" error. The hints > appear > only when the actual CPU or architecture name is misspelled. > > Bootstrapped and tested on aarch64-none-linux-gnu. > > Ok for trunk?
I like this idea. Though I need to check how it will interact with my patch set which I am doing right now to support some more of Cavium's SOCs. Thanks, Andrew Pinski > > Thanks, > Kyrill > > [1] https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00339.html > > 2016-10-07 Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): > New function. > (aarch64_print_hint_for_core): Likewise. > (aarch64_print_hint_for_arch): Likewise. > (aarch64_validate_march): Use it. Fix indentation in type signature. > (aarch64_validate_mcpu): Use aarch64_print_hint_for_core_or_arch. > (aarch64_validate_mtune): Likewise. > (aarch64_handle_attr_arch): Likewise. > (aarch64_handle_attr_cpu): Likewise. > (aarch64_handle_attr_tune): Likewise. > > 2016-10-07 Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > * gcc.target/aarch64/spellcheck_1.c: New test. > * gcc.target/aarch64/spellcheck_2.c: Likewise. > * gcc.target/aarch64/spellcheck_3.c: Likewise. > * gcc.target/aarch64/spellcheck_4.c: Likewise. > * gcc.target/aarch64/spellcheck_5.c: Likewise. > * gcc.target/aarch64/spellcheck_6.c: Likewise.