OSDN Git Service

* cgraph.h (cgraph_edge_p): New.
[pf3gnuchains/gcc-fork.git] / gcc / loop-unroll.c
index d25caf9..5c28eaf 100644 (file)
@@ -84,9 +84,6 @@ struct iv_to_split
                           XEXP (XEXP (single_set, loc[0]), loc[1]).  */ 
 };
 
-DEF_VEC_P(rtx);
-DEF_VEC_ALLOC_P(rtx,heap);
-
 /* Information about accumulators to expand.  */
 
 struct var_to_expand
@@ -1167,6 +1164,9 @@ unroll_loop_runtime_iterations (struct loops *loops, struct loop *loop)
             ";; Unrolled loop %d times, counting # of iterations "
             "in runtime, %i insns\n",
             max_unroll, num_loop_insns (loop));
+
+  if (dom_bbs)
+    free (dom_bbs);
 }
 
 /* Decide whether to simply peel LOOP and how much.  */
@@ -1670,7 +1670,17 @@ analyze_iv_to_split_insn (rtx insn)
     return NULL;
 
   ok = iv_analyze_result (insn, dest, &iv);
-  gcc_assert (ok);
+
+  /* This used to be an assert under the assumption that if biv_p returns
+     true that iv_analyze_result must also return true.  However, that
+     assumption is not strictly correct as evidenced by pr25569.
+
+     Returning NULL when iv_analyze_result returns false is safe and
+     avoids the problems in pr25569 until the iv_analyze_* routines
+     can be fixed, which is apparently hard and time consuming
+     according to their author.  */
+  if (! ok)
+    return NULL;
 
   if (iv.step == const0_rtx
       || iv.mode != iv.extend_mode)