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: Enable -funit-at-a-time at -O1


On Thu, 23 Jun 2005, Giovanni Bajo wrote:

> Just for information, what's the roadmap towards enabling unit-at-a-time by
> default in C (as it is in C++)? What is missing?

Nothing is in the way of enabling it by default (though compile-time 
performance at -O0 might get slightly worse).  The useful thing would be 
removing non-unit-at-a-time mode altogether.  That's waiting on preserving 
the order of toplevel asms, functions and variables (possibly under a new 
option also called -fno-unit-at-a-time, possibly whenever a toplevel asm 
is seen) for C, for which there is a partial patch 
<http://gcc.gnu.org/ml/gcc-patches/2005-04//msg01102.html>.

(As a *theoretical* matter you might say code shouldn't use toplevel asms 
that way.  As a *practical* matter, preserving declaration and asm order 
for existing users of -fno-unit-at-a-time (and disabling any other 
optimizations that prove problematic for such users on a case-by-case 
basis) allows making unit-at-a-time always on without immediately breaking 
a lot of code.  You can always clean up crtstuff.c and deprecate 
-fno-unit-at-a-time later if desired.)

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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