summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/unroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/unroll.c')
-rw-r--r--contrib/gcc/unroll.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/gcc/unroll.c b/contrib/gcc/unroll.c
index 9a0cfcf..6936a71 100644
--- a/contrib/gcc/unroll.c
+++ b/contrib/gcc/unroll.c
@@ -727,8 +727,7 @@ unroll_loop (loop, insn_count, strength_reduce_p)
if (max_labelno > 0)
{
- map->label_map = (rtx *) xmalloc (max_labelno * sizeof (rtx));
-
+ map->label_map = (rtx *) xcalloc (max_labelno, sizeof (rtx));
local_label = (char *) xcalloc (max_labelno, sizeof (char));
}
@@ -2222,6 +2221,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
pattern = copy_rtx_and_substitute (PATTERN (insn), map, 0);
copy = emit_call_insn (pattern);
REG_NOTES (copy) = initial_reg_note_copy (REG_NOTES (insn), map);
+ SIBLING_CALL_P (copy) = SIBLING_CALL_P (insn);
/* Because the USAGE information potentially contains objects other
than hard registers, we need to copy it. */
@@ -3744,7 +3744,18 @@ loop_iterations (loop)
for (biv_inc = bl->biv; biv_inc; biv_inc = biv_inc->next_iv)
{
if (loop_insn_first_p (v->insn, biv_inc->insn))
- offset -= INTVAL (biv_inc->add_val);
+ {
+ if (REG_P (biv_inc->add_val))
+ {
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+ "Loop iterations: Basic induction var add_val is REG %d.\n",
+ REGNO (biv_inc->add_val));
+ return 0;
+ }
+
+ offset -= INTVAL (biv_inc->add_val);
+ }
}
}
if (loop_dump_stream)
OpenPOWER on IntegriCloud