On Sun, Dec 22, 2013 at 12:19:56PM +0100, Uros Bizjak wrote: > On Fri, Dec 20, 2013 at 5:55 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > > On Fri, Dec 20, 2013 at 8:47 AM, Ilya Tocar <tocarip.in...@gmail.com> wrote: > >>> > Perhaps we should add sandybridge, ivybridge and haswell aliases for > >>> > corei7-avx, core-avx-i, core-avx2? I mean, it is a nightmare to > >>> > remember > >>> > which one has the i7 in and which doesn't even for me. > >>> > >>> Yes please, I think this is a good idea. > >> > >> I've added aliases for haswell, sandybridge, ivybridge, bonnell, > >> nehalem and silvermont. > >> > > Old names, like corei7, core-avx-i, atom, .. don't have precise > > description for the processor. I think gcc driver should keep > > accepting them. But they should be marked as undocumented > > or deprecated. They should be removed from documentation. > > How about we leave these as -march=... to refer to the architecture, > and reintroduce -mcpu= to refer to the exact cpu? Internally, the > -mcpu would use some architecture specific base PTA_ attributes (as > Jakub suggested) and would add some fine-tuning PTA_ attributes, based > on -mcpu selection. This way, -march stays as is, and can still be > used for some generally distributed binaries.
-mcpu is problematic, because it means various things among different targets, and even on i?86/x86_64 it used to mean something already in the past. Sometimes -mcpu= is what -march= is now on i?86/x86_64, sometimes what -mtune= is. I'd say we don't need to deprecate anything, just add new aliases for the sometimes harder to remember names. But everything just IMHO. Jakub