This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: New option: -fno-toplevel-order
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 14 Jan 2006 13:40:27 -0800
- Subject: Re: PATCH RFA: New option: -fno-toplevel-order
- References: <20060109044747.6387.qmail@gossamer.airs.com>
Ian Lance Taylor wrote:
> This patch introduces a new option -fno-toplevel-reorder.
Great!
> We may still want to keep -fno-unit-at-a-time anyhow because it uses
> less memory. I don't have an opinion on that, although I note that
> the Java frontend currently disables unit-at-a-time mode. I just want
> to make that discussion separate from the discussion of effects on
> users other than compilation speed.
Yes, that's sensible. (My current feeling is that we do want to
eliminate -fno-unit-at-a-time, but as you say, we can have that
discussion orthogonally.)
> In step 4 a few tests failed as expected. For example,
> gcc.dg/varpool-1.c failed, because it tests that an unreferenced
> static variable is eliminated, which is not true when
> -fno-toplevel-reorder is used.
Clearly, then, before we can switch to -funit-at-a-time
-fno-toplevel-reorder as a replacement for the current
-fno-unit-at-a-time switch, we'll need to adjust those tests. I don't
think you need to do it yet, though.
> There were two tests which failed with -fno-toplevel-reorder, both C++
> tests: g++.old-deja/g++.brendan/union1.C and
> g++.old-deja/g++.other/anon2.C. This seems like a low priority issue which I propose
> to handle in a followup.
That's OK, but I'd like you to commit to fixing that (or working with me
to do so) before 4.2. Otherwise, we're introducing a switch that users
might try to use, with actual new failures as a result.
> This patch touches the C and C++ frontends, so I would need approval
> for that. In any case I would like to hear comments on it.
The C++ bits are OK. I'll approve the C bits, too, subject to a 48-hour
delay for the C maintainers to object.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713