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: What to do about compile time slowdowns for 4.1?


Steven Bosscher wrote:
> 
> So GCC 4.1 right now is a small compile time disaster.  Are there any
> ideas for what can be done about it before releasing it?
> 

I was looking at the testcase sent by Dale Johannesen both at tree
level and at rtl level:

> extern int a[];
> int foo(int w) {
>   int n = w;
>   while (n >= 512)
>     {
>     a[n] = 42;
>     n -= 256;
>     }
>   }

Do you know how many times we are estimating the number of iterations
for this code at -O2?

tree level: 7 times
Breakpoint 3, number_of_iterations_cond (type=0x2aaaaadf84d0, base0=0x2aaaaae03d80, step0=0x0, code=LE_EXPR, base1=0x2aaaaafd5b90, step1=0x2aaaaafc8d20, 
    niter=0xc174b0) at tree-ssa-loop-niter.c:436

rtl level: once
Breakpoint 4, iv_number_of_iterations (loop=0xc324b0, insn=0x2aaaaafdf730, condition=0x2aaaaafe31a0, desc=0x7fffff912ff0) at loop-iv.c:2416

It seems to me that we have to reuse the computed information instead
of throwing away all the results and all the estimations at the end of
each tree level loop optimization...  it probably was a good idea when
there were a few loop optimizations, but discarding loop informations
just because we have probably invalidated a part of the ssa_names is
not the way I want to walk.

seb


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