RFA: New option: --optimizers-help

Daniel Jacobowitz drow@false.org
Wed May 3 14:46:00 GMT 2006


On Wed, May 03, 2006 at 09:40:59AM +0100, Nick Clifton wrote:
> > $ gcc -O2 --optimizers-list
> > -fstrength-reduce [enabled]
> > -finline-functions [disabled]
> 
> I like it, although it makes it slightly harder to use this feature to 
> find out which specific optimizations are enabled at a particular 
> optimization level.

Actually, I'd find it much easier.  You could grep for "\[enabled\]" :-)

> (This is my favorite feature of the patch, since I 
> often have need of this information when trying to track down a 
> mis-optimization at a particular optimization level).

Bear in mind that some optimizations are triggered off of e.g.
optimize > 2.  Maybe such things are bugs and should be fixed...

> So how about output like this:
> 
>   $ gcc -O2 --list-optimizers
>   -fstrength-reduce    [enabled]
>   -finline-functions   [disabled]
>                     ^^^
>                  TABS in here

I'm happy with this.  Does it suppress compilation?  [I'm guessing yes,
and it probably should, but OTOH having a way to put this in
-fverbose-asm might be nice.]

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gcc-patches mailing list