Deprecate -funit-at-a-time

Janis Johnson janis187@us.ibm.com
Fri Jul 18 22:52:00 GMT 2008


On Fri, 2008-07-18 at 21:46 +0200, Jan Hubicka wrote:
> > On Fri, Jul 18, 2008 at 08:14:40PM +0200, Richard Guenther wrote:
> > > On Fri, Jul 18, 2008 at 7:29 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > > >> Richard Guenther wrote:
> > > >> Why -fno-section-anchors?
> > > >
> > > > See Jakub's message.
> > > 
> > > I agree with Mark.  -fno-toplevel-reorder should imply
> > > -fno-section-anchors instead.
> > 
> > Explicit -fno-toplevel-reorder should imply -fno-section-anchors, but didn't
> > Honza want to make -fno-toplevel-reorder the default at -O0 (or is it
> > already)?  If yes, perhaps the PPC folks wouldn't be happy that
> > -fno-section-anchors is used for -O0.
> 
> I enabled it at O0 already.  For C ti didn't seem appropriate to do
> implicit reordering or to drop unused static vars.  It has turned out to
> be interesting at least in keeping -fno-toplevel-reorder working, it had
> uncovered nuber of bugs.
> 
> Well, I guess we have concensus on following:
> 
>  1) keep -funit-at-a-time option forever implying -fno-toplevel-reorder
>  2) explicit -fno-toplevel-reorder imply -fno-section-anchors
>     (I can imagine use of ASM statements that is compatible with anchors
>     but you don't want other changes of -fno-toplevel-reprder)
>  3) explicit -fno-topelvel-reoder and -fsection-anchors should error.
> 
> I can make -O0 just to enable -fno-toplevel-reorder but no anchors, or I
> can drop -fno-toplevel-reorder from -O0 whatever seems more appropriate.

For rs6000, section anchors are enabled for frontends that support
them.  The recent change to -O0 enabling -fno-toplevel-reorder
uncovered a bug with TLS; see PR 36756.  Is that a bug that should
be fixed in TLS handling, or should rs6000 not enable section
anchors with no-toplevel-reorder?

> To make -funit-at-a-time to cancel -fno-unit-at-a-time, I guess I am
> stick with keeping the option and handling everything in opts.c, right?
> (that is init flag_section_anchors and flag_toplevel_reorder to 2 and
> handle the defaults by hand).

Janis



More information about the Gcc-patches mailing list