[PATCH 0/3] RFC: Let debug stmts influence codegen@-Og
Wed Jun 26 08:38:00 GMT 2019
On 23/06/19 14:51 +0100, Richard Sandiford wrote:
>Also, the new mode is mostly orthogonal to the optimisation level
>(although it would in effect disable optimisations like loop
>vectorisation, until we have a way of representing debug info for
>vectorised loops). The third patch therefore adds an -O1g option
>that optimises more heavily than -Og but provides a better debug
>experience than -O1.
I think it would be confusing to have -O and -O1 mean the same, but
-Og and -O1g mean something different.
Maybe another name could avoid that, e.g. appending +g to signify the
new modes, so -O+g and -O1+g would mean the same thing.
>I think -O2g would make sense too, and would be a viable option
>for people who want to deploy relatively heavily optimised binaries
>without compromising the debug experience too much.
Which would be -O2+g using the naming scheme above.
If the mode is orthogonal to optimisation level I think this is
clearer, because you can have +g appended to any level, -Os+g, maybe
even -Og+g ;-)
More information about the Gcc-patches