This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimization issue about -O2 and -Os
>>>>> Phil Edwards writes:
Phil> On Fri, Apr 30, 2004 at 06:21:26PM +0100, Dave Korn wrote:
>> Hmm, maybe it would be worthwhile to invent -f options for all these
>> ad-hoc tests on the optimize variables, so that the -O options then *did*
>> become shorthand for flag sets, and the suggestion I already made for
>> localising the failure with a given -O setting would actually work?
Phil> We need fewer -f options, really, not more of them.
Phil> Or to put it another way: if an optimization pass is buggy, it doesn't
Phil> deserve to have an -f option yet.
I think this is confusing two different motivations and trying to
create a single answer for both, which will not work.
If one considers -f options as intended only for the general user,
there probably are too many. However, if one is performing component/unit
testing or debugging or performance tuning or providing consulting
services, there are not enough options.
Developers and advanced users should be able to enable and disable
every optimization option at a fine granularity at compile time, not when
building GCC. Labeling those as "-f" options and documenting them for the
general user is a separate issue.
David