This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: New option: -fno-toplevel-order


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]