This is the mail archive of the
mailing list for the GCC project.
Re: Could you please clarify about GCC optimizations?
- From: Jeff Law <law at redhat dot com>
- To: Evgeniya Maenkova <evgeniya dot maenkova at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 08 Aug 2014 13:07:24 -0600
- Subject: Re: Could you please clarify about GCC optimizations?
- Authentication-results: sourceware.org; auth=none
- References: <CANVW7MPT6eYbzCto9DXLCkGO5WRnca+ehLCEpSqjBQkAMTM8tQ at mail dot gmail dot com>
On 08/08/14 06:18, Evgeniya Maenkova wrote:
As far as I know, there are so many configurations (frontends x
backends x applications(benchmarks) x etc), that the same optimization
could improve performance in one configuration and degrade at other
Each developer makes their own determination as to what performance
tests are appropriate to run and on what platforms to run those tests.
Some rely largely on SPEC, others utilize large desktop applications
such as firefox and others are more focused on EEMBC, etc. It really
depends on each developer's focus.
What performance tests do you perform before including an optimization
in GCC? How do you aggregate the results (taking into account
different behavior on different frontend/backend/benchmarks)?
Excuse me, if some information is available in GCC documentation,
didnât found so far.
In general optimizations on GIMPLE/SSA are in large designed to
eliminate as much redundancy as possible independent of the target
processor. There are exceptions, but as a guiding principle that is
When GIMPLE is lowered to RTL, the expanders query the backend for a
information to guide lowering to RTL in a target dependent way.
Similarly the RTL optimizers are designed to query the backend for
information to guide low level aspects of code generation and optimization.
When optimizations are submitted for inclusion, there's a review process
where the code reviewers may ask questions or ask for further
benchmarks, etc. The reviewers also use their experience to guide
submissions in the right direction.
So there's no single simple answer. It varies based on many factors.