This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimal Optimizations: A Very Preliminary Report
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Scott Robert Ladd <coyote at coyotegulch dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 12 Aug 2003 12:09:57 -0400
- Subject: Re: Optimal Optimizations: A Very Preliminary Report
- Organization: Red Hat Canada
- References: <3F383D51.1080202@coyotegulch.com>
On Mon, 2003-08-11 at 21:05, Scott Robert Ladd wrote:
> In the vast majority of cases, anecdotal assertions lack any formal
> proof of their validity, and, more often than not, the suggested
> "improvement" is ineffective or detrimental. It has become increasingly
> obvious that no one -- myself included -- knows precisely how all these
> GCC options work together in generating executable code.
>
I haven't visited your site, but from this message you seem to
concentrate on one axis of the problem: the combination of the different
optimization options.
As I see it, the problem has at least three dimensions:
1. Selection of optimization options
2. Ordering of the different passes
3. Programs used as benchmarks
Ideally, one would explore that 3 dimensional space and cut slices to
stick in the different -Ox. GCC will let you play with #1 (to a certain
extent) and #3, but you cannot change #2.
There may even be a 4th dimension: input language. There are
optimizations that are language specific that help certain languages but
not others (escape analysis, dispatch table optimizations).
I seem to remember reading/hearing that just the selection and ordering
is either NP-hard or intractable. But that was years ago and I can't
find a reference now, so I take it with a grain of salt.
In any case, I think what you're doing is great and I'm very interested
in the results. What are the applications that you're using for your
study?
Diego.