This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: alpha bootstrap failure wrt loop
- To: Jorn Wolfgang Rennecke <amylaar at cygnus dot com>
- Subject: Re: alpha bootstrap failure wrt loop
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sat, 30 Jan 1999 01:05:35 -0800
- Cc: egcs-bugs at cygnus dot com, egcs-patches at cygnus dot com
- References: <19990129180454.A27134@cygnus.com>
On Fri, Jan 29, 1999 at 06:04:54PM -0800, Richard Henderson wrote:
> The loop at the end of validate_replace_rtx_1 is (still) being
> miscompiled on Alpha, leading to a segv while compiling libgcc.a.
>
> The problem appears to be reading from an uninitialized stack slot:
This is caused by move_movables not preserving the luid invariant.
The uid_luid array is completely undependable at the beginning of
strength_reduce.
The answer is to have strength_reduce recalculate; this also
affords the opportunity to remove some other local recalculations
and do it all at once later.
This solves the problem as seen on alpha in that one instance.
I cannot yet bootstrap, but do get farther. The new problem
is a segv in reload, which I will look into tomorrow.
r~
* loop.c (strength_reduce): After biv identification, unconditionally
recompute luids for the entire loop.
--- loop.c Fri Jan 29 23:30:08 1999
+++ z Fri Jan 29 23:18:22 1999
@@ -4055,12 +4054,7 @@
if (loop_dump_stream)
fprintf (loop_dump_stream, "move after insn %d\n",
INSN_UID (dominator));
- /* Avoid problems with luids by actually moving the insn
- and adjusting all luids in the range. */
reorder_insns (giv_insn, giv_insn, dominator);
- for (p = dominator; INSN_UID (p) >= max_uid_for_loop; )
- p = PREV_INSN (p);
- compute_luids (giv_insn, after_giv, INSN_LUID (p));
/* If the only purpose of the init insn is to initialize
this giv, delete it. */
if (single_set (bl->init_insn)
@@ -4069,12 +4063,7 @@
}
else if (! insn_first_p (bl2->biv->insn, bl->biv->insn))
{
- rtx p = PREV_INSN (giv_insn);
- while (INSN_UID (p) >= max_uid_for_loop)
- p = PREV_INSN (p);
reorder_insns (giv_insn, giv_insn, bl2->biv->insn);
- compute_luids (after_giv, NEXT_INSN (giv_insn),
- INSN_LUID (p));
}
/* Remove this biv from the chain. */
if (bl->next)
@@ -4093,6 +4082,9 @@
}
}
+ /* Moveable movement and reorginations above did not preserve luids. */
+ compute_luids (loop_start, loop_end, 0);
+
/* If a biv is unconditionally incremented several times in a row, convert
all but the last increment into a giv. */