public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: More on infinite loop in bootstrap
  1999-06-30 23:07 More on infinite loop in bootstrap Chip Salzenberg
@ 1999-06-30 23:07 ` Chip Salzenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Chip Salzenberg @ 1999-06-30 23:07 UTC (permalink / raw)
  To: egcs-bugs

No comments on the below... Hm...  In the meantime, I've noticed that
it hangs on "-O2" but doesn't hang on "-O2 -fno-strength-reduce".

According to Chip Salzenberg:
> I've narrowed down the infinite loop.  It occurs when stage1/cc1 tries
> to compile regclass.c:init_reg_modes with -O2.  With -O1 it doesn't
> loop.  (I don't know if it generates good code, though).  The problem
> function is, oddly enough, *tiny*:
> 
> ----------------------------------------------------------------
> static void
> init_reg_modes ()
> {
>   register int i;
> 
>   for (i = 0; i < 17 ; i++)
>     {
>       reg_raw_mode[i] = choose_hard_reg_mode (i, 1);
>       if (reg_raw_mode[i] == VOIDmode)
> 	reg_raw_mode[i] = i == 0 ? word_mode : reg_raw_mode[i-1];
>     }
> }
> ----------------------------------------------------------------
> 
> The looping cc1 seems to be spending all its time in find_life_end:
> 
> ----------------------------------------------------------------
> Program received signal SIGINT, Interrupt.
> find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14, biv=0x83a79d8)
>     at ../SRC/gcc/loop.c:7106
> 7106            rtx reg = SET_DEST (x);
> (gdb) where
> #0  find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14, 
>     biv=0x83a79d8) at ../SRC/gcc/loop.c:7106
> #1  0x80f0004 in recombine_givs (bl=0x83ce034, loop_start=0x83a0d98, 
>     loop_end=0x83a1644, unroll_p=0) at ../SRC/gcc/loop.c:7357
> #2  0x80ed1a3 in strength_reduce (scan_start=0x83a0dd0, end=0x83a1644, 
>     loop_top=0x0, insn_count=19, loop_start=0x83a0d98, loop_end=0x83a1644, 
>     loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:4763
> #3  0x80e8558 in scan_loop (loop_start=0x83a0d98, end=0x83a1644, 
>     loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:1172
> #4  0x80e7604 in loop_optimize (f=0x82da854, dumpfile=0x0, unroll_p=0, bct_p=0)
>     at ../SRC/gcc/loop.c:574
> #5  0x804c147 in rest_of_compilation (decl=0x839d718)
>     at ../SRC/gcc/toplev.c:3939
> #6  0x81808da in finish_function (nested=0) at ../SRC/gcc/c-decl.c:7268
> #7  0x8171037 in yyparse () at c-parse.y:349
> #8  0x804b1a2 in compile_file (name=0xbffffcd0 "regclass.i")
>     at ../SRC/gcc/toplev.c:3265
> #9  0x804e155 in main (argc=3, argv=0xbffffb74) at ../SRC/gcc/toplev.c:5441
> ----------------------------------------------------------------
> 
> -- 
> Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
>       "When do you work?"   "Whenever I'm not busy."

-- 
Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
      "When do you work?"   "Whenever I'm not busy."


^ permalink raw reply	[flat|nested] 2+ messages in thread

* More on infinite loop in bootstrap
@ 1999-06-30 23:07 Chip Salzenberg
  1999-06-30 23:07 ` Chip Salzenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Chip Salzenberg @ 1999-06-30 23:07 UTC (permalink / raw)
  To: egcs-bugs

I've narrowed down the infinite loop.  It occurs when stage1/cc1 tries
to compile regclass.c:init_reg_modes with -O2.  With -O1 it doesn't
loop.  (I don't know if it generates good code, though).  The problem
function is, oddly enough, *tiny*:

----------------------------------------------------------------
static void
init_reg_modes ()
{
  register int i;

  for (i = 0; i < 17 ; i++)
    {
      reg_raw_mode[i] = choose_hard_reg_mode (i, 1);
      if (reg_raw_mode[i] == VOIDmode)
	reg_raw_mode[i] = i == 0 ? word_mode : reg_raw_mode[i-1];
    }
}
----------------------------------------------------------------

The looping cc1 seems to be spending all its time in find_life_end:

----------------------------------------------------------------
Program received signal SIGINT, Interrupt.
find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14, biv=0x83a79d8)
    at ../SRC/gcc/loop.c:7106
7106            rtx reg = SET_DEST (x);
(gdb) where
#0  find_life_end (x=0x83a0e08, stats=0xbfff955c, insn=0x83a0e14, 
    biv=0x83a79d8) at ../SRC/gcc/loop.c:7106
#1  0x80f0004 in recombine_givs (bl=0x83ce034, loop_start=0x83a0d98, 
    loop_end=0x83a1644, unroll_p=0) at ../SRC/gcc/loop.c:7357
#2  0x80ed1a3 in strength_reduce (scan_start=0x83a0dd0, end=0x83a1644, 
    loop_top=0x0, insn_count=19, loop_start=0x83a0d98, loop_end=0x83a1644, 
    loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:4763
#3  0x80e8558 in scan_loop (loop_start=0x83a0d98, end=0x83a1644, 
    loop_cont=0x83a1534, unroll_p=0, bct_p=0) at ../SRC/gcc/loop.c:1172
#4  0x80e7604 in loop_optimize (f=0x82da854, dumpfile=0x0, unroll_p=0, bct_p=0)
    at ../SRC/gcc/loop.c:574
#5  0x804c147 in rest_of_compilation (decl=0x839d718)
    at ../SRC/gcc/toplev.c:3939
#6  0x81808da in finish_function (nested=0) at ../SRC/gcc/c-decl.c:7268
#7  0x8171037 in yyparse () at c-parse.y:349
#8  0x804b1a2 in compile_file (name=0xbffffcd0 "regclass.i")
    at ../SRC/gcc/toplev.c:3265
#9  0x804e155 in main (argc=3, argv=0xbffffb74) at ../SRC/gcc/toplev.c:5441
----------------------------------------------------------------

-- 
Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
      "When do you work?"   "Whenever I'm not busy."


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-30 23:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-30 23:07 More on infinite loop in bootstrap Chip Salzenberg
1999-06-30 23:07 ` Chip Salzenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).