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: Reduce startup cost of compiler (patch 1)


> On Mon, 23 Jul 2007, Jan Hubicka wrote:
> 
> > There are also some constants built by i386 that are quite common.
> 
> The stuff in ext_80387_constants_table already looks like it's initialized
> in a lazy fashion, if that's what you're referring to.
> 
> Everywhere it's used there's a guarded check on ext_80387_constants_init,
> and it calls init_ext_80387_constants() if necessary.
> 
> 
> > Doing lazy initialization of those, if easilly doable, seems like good
> > idea to me.
> 
> What does this (untested) patch do to your oprofile?  If there's any do_*
> functions left, it's probably from creating dconstthird = 1/3.  I can get
> rid of that as well if necessary, but it's slightly more work.
Hi,
it seems to help. do_add is still relatively high, but it is not too
critical at least until optabs are tracked down.

My little benchmark works now at 1.24s user, 2.35s real now.
The patch seems to break later in bootstrap, but I am sure you can solve
that ;)

Honza

CPU: AMD64 processors, speed 1600 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        image name               app name                 symbol name
160807   44.3543  no-vmlinux               no-vmlinux               (no symbols)
10979     3.0283  cc1                      cc1                      ggc_alloc_stat
7192      1.9837  libc-2.5.so              libc-2.5.so              memset
7191      1.9834  libc-2.5.so              libc-2.5.so              strlen
6824      1.8822  cc1                      cc1                      new_convert_optab
5477      1.5107  cc1                      cc1                      free_binding_and_advance
5456      1.5049  libc-2.5.so              libc-2.5.so              _int_malloc
3810      1.0509  cc1                      cc1                      make_node_stat
3179      0.8768  cc1                      cc1                      do_add
3143      0.8669  ld-2.5.so                ld-2.5.so                do_lookup_x
3110      0.8578  cc1                      cc1                      init_regs
3095      0.8537  cc1                      cc1                      do_multiply
2915      0.8040  libc-2.5.so              libc-2.5.so              memcpy
2894      0.7982  cc1                      cc1                      tree_code_size
2828      0.7800  cc1                      cc1                      do_divide
2742      0.7563  cc1                      cc1                      ht_lookup_with_hash
2682      0.7398  cc1                      cc1                      pop_scope


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