Commit a22455df by Olivier Hainque Committed by Franz Sirl

unroll.c (loop_iterations): Give up on jumps with null JUMP_LABEL while scanning…

unroll.c (loop_iterations): Give up on jumps with null JUMP_LABEL while scanning for multiple back edges.

	2001-12-01  Olivier Hainque <hainque@act-europe.fr>

	* unroll.c (loop_iterations): Give up on jumps with null JUMP_LABEL
	while scanning for multiple back edges.

From-SVN: r47510
parent 8a155ecc
2001-12-01 Olivier Hainque <hainque@act-europe.fr>
* unroll.c (loop_iterations): Give up on jumps with null JUMP_LABEL
while scanning for multiple back edges.
2001-12-01 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 2001-12-01 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* ginclude/ppc-asm.h (JUMP_TARGET): New macro. * ginclude/ppc-asm.h (JUMP_TARGET): New macro.
......
...@@ -3551,18 +3551,31 @@ loop_iterations (loop) ...@@ -3551,18 +3551,31 @@ loop_iterations (loop)
do do
{ {
if (GET_CODE (temp) == JUMP_INSN if (GET_CODE (temp) == JUMP_INSN)
/* Previous unrolling may have generated new insns not covered
by the uid_luid array. */
&& INSN_UID (JUMP_LABEL (temp)) < max_uid_for_loop
/* Check if we jump back into the loop body. */
&& INSN_LUID (JUMP_LABEL (temp)) > INSN_LUID (loop->top)
&& INSN_LUID (JUMP_LABEL (temp)) < INSN_LUID (loop->cont))
{ {
if (loop_dump_stream) /* There are some kinds of jumps we can't deal with easily. */
fprintf (loop_dump_stream, if (JUMP_LABEL (temp) == 0)
"Loop iterations: Loop has multiple back edges.\n"); {
return 0; if (loop_dump_stream)
fprintf
(loop_dump_stream,
"Loop iterations: Jump insn has null JUMP_LABEL.\n");
return 0;
}
if (/* Previous unrolling may have generated new insns not
covered by the uid_luid array. */
INSN_UID (JUMP_LABEL (temp)) < max_uid_for_loop
/* Check if we jump back into the loop body. */
&& INSN_LUID (JUMP_LABEL (temp)) > INSN_LUID (loop->top)
&& INSN_LUID (JUMP_LABEL (temp)) < INSN_LUID (loop->cont))
{
if (loop_dump_stream)
fprintf
(loop_dump_stream,
"Loop iterations: Loop has multiple back edges.\n");
return 0;
}
} }
} }
while ((temp = PREV_INSN (temp)) != loop->cont); while ((temp = PREV_INSN (temp)) != loop->cont);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment