This is the mail archive of the
mailing list for the GCC project.
Re: Drop generic32 cost model
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, Jan Hubicka <hubicka at ucw dot cz>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "matz at suse dot de" <matz at suse dot de>, "Lu, Hongjiu" <hongjiu dot lu at intel dot com>, "Ostanevich, Sergey Y" <sergey dot y dot ostanevich at intel dot com>
- Date: Fri, 20 Sep 2013 17:22:45 +0200
- Subject: Re: Drop generic32 cost model
- Authentication-results: sourceware.org; auth=none
- References: <20130918203949 dot GB11466 at kam dot mff dot cuni dot cz> <0EFAB2BDD0F67E4FB6CCC8B9F87D7569427AE75F at IRSMSX101 dot ger dot corp dot intel dot com> <CAKOQZ8wVuNvCumRvzFAJK0drMhYpBUG4pmPNrE__jKxKS9QMdw at mail dot gmail dot com>
> On Fri, Sep 20, 2013 at 6:00 AM, Zamyatin, Igor <firstname.lastname@example.org> wrote:
> > For x86 32-bit is still important due to mobile market so we would like to make some measurements first to see how this new generic model works on 32 bits
I assume by mobile market you mean atom CPU these days (not Pentium-M generic32
was tuned for).
> I would expect people compiling code for the mobile market to use an
> appropriate -mtune option. What this patch affects is the default
I agree here. Moreover the 32bit generic model is not at all that new. It is
same as the old code only flipping the four flags I mentioned plus changing the
scheduling to K8 instead of PPro based model. The flags changed are:
use_leave - this was there because pentium-M was slow on leave instructions.
How does atom behave here?
avoid_vector_decode - this is affecting gneration of integer->FP conversions
K8 preferred to use vector instructions to avoid penalty.
We now enable the flag:
m_CORE_ALL | m_K8 | m_GENERIC64
I suppose we enabled it for Generic as a result of the overall ideology
of not using instructions in generic that have evil performance
on one of CPUs we consider important for generic.
I think the flag was copied to CORE as a result of core tunning being
based on generic tuning and hsould be dropped - both from core and
generic based on fact that newer AMD CPUs do not care.
This enables splitting of those instructions into move+mul that should
not be terrible for atom either.
Again, I think this flag is mistakely enabled for core.
I need to dig up the thread we had last year about dropping
some of these - as I recall, all except for inc/dec was fine.