This is the mail archive of the gcc@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: New GCC releases comparison and comparison of GCC4.4 and LLVM2.5 on SPEC2000


On Wed, May 13, 2009 at 05:42:03PM +0200, Jan Hubicka wrote:
> > Paolo Bonzini wrote:
> > >
> > >Rather, we should seriously understand what caused the compilation time
> > >jump in 4.2, and whether those are still a problem.  We made a good job
> > >in 4.0 and 4.3 offsetting the slowdowns from infrastructure changes with
> > >speedups from other changes; and 4.4 while slower than 4.3 at least
> > >stays below 4.2.  But, 4.2 was a disaster for compilation time.
> > >
> > >  
> > It was interesting for me that GCC4.4 is faster than GCC4.3 on Intel 
> > Core I7.  This is  not true for most other processors (at least for P4, 
> > Core2, Power4/5/6 etc).  Intel Core I7 has 3rd level big and fast cache 
> > and memory controller on the chip.  I guess that slowdown in GCC is 
> > mostly because of data and/or code locality.
> 
> Note that one of important reasons for slowdowns is the startup cost.
> Binarry is bigger, we need more libraries and we do more initialization.
> With per-function flags via attributes, we are now initializing all the
> builtins and amount of builtins in i386 backend has grown to quite
> extreme sizes.  In 4.3 timeframe I did some work on optimizing startup
> costs that translated quite noticeably to kernel compilation time.  It
> might be interesting to consider some scheme for initializing them
> lazilly.

For C and C++ on x86/x86_64, the compiler does not create the decls for the
builtin functions until it is compiling an ISA that supports the builtin.  So
on x86_64, it will create the sse and sse2 builtins by default, but not the
sse4, sse5, avx builtins until you use the appropriate -m<xxx> flag or specify
a target specific option in the attributes or pragmas.  Yes, an initial version
of my patches did create all of the nodes, but the August 29th checkin did
restrict building the builtins to the ISA supported.

Now, it does create the builtins all of the time for other languages, since
they don't register the appropriate create a builtin function in external scope
hook.

However, that still leaves the compiler creating a lot of builtins that mostly
aren't used.  It may be useful to register names, and have a call back to
create the builtin if the name is actually used.  It certainly would eliminate
a lot of memory space, and time in the compiler.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


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