This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Improving GCC8 default option settings
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Tue, 12 Sep 2017 21:38:09 -0400
- Subject: Re: RFC: Improving GCC8 default option settings
- Authentication-results: sourceware.org; auth=none
- References: <HE1PR0801MB2058CFEE6A9C43380337A83F83690@HE1PR0801MB2058.eurprd08.prod.outlook.com>
- Reply-to: noloader at gmail dot com
> * Make -fomit-frame-pointer the default - various targets already do this at
> higher optimization levels, but this could easily be done for all targets.
> Frame pointers haven't been needed for debugging for decades, however if there
> are still good reasons to keep it enabled with -O0 or -O1 (I can't think of any
> unless it is for last-resort backtrace when there is no unwind info at a crash),
> we could just disable the frame pointer from -O2 onwards.
Given there's an -Og now, maybe frame pointers could be enabled fo -O0
and -Og, off by default otherwise.
I like to use -O1 to kick-in the analysis engine and start catching
warnings. It seems like -O1 should be closer -O2/-O3, with respect to
frame pointers since it could help find issues and tickle problems
with hand crafted ASM.