+2006-11-19 Andrew Pinski <pinskia@gmail.com>
+
+ PR rtl-opt/29879
+ * fwprop.c (loops): Remove.
+ (forward_propagate_into): Use current_loops instead of
+ loops.
+ (fwprop_init): Call loop_optimizer_init instead of
+ flow_loops_find.
+ (fwprop_done): Call loop_optimizer_finalize instead of
+ flow_loops_free.
+ (fwprop): Use current_loops instead of loops.
+
2006-11-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/8586
where the first two insns are now dead. */
-static struct loops loops;
static struct df *df;
static int num_changes;
/* Do not propagate loop invariant definitions inside the loop if
we are going to unroll. */
- if (loops.num > 0
+ if (current_loops
&& DF_REF_BB (def)->loop_father != DF_REF_BB (use)->loop_father)
return;
before df_analyze, because flow_loops_find may introduce new jump
insns (sadly) if we are not working in cfglayout mode. */
if (flag_rerun_cse_after_loop && (flag_unroll_loops || flag_peel_loops))
- flow_loops_find (&loops);
+ loop_optimizer_init (0);
/* Now set up the dataflow problem (we only want use-def chains) and
put the dataflow solver to work. */
df_finish (df);
if (flag_rerun_cse_after_loop && (flag_unroll_loops || flag_peel_loops))
- {
- flow_loops_free (&loops);
- loops.num = 0;
- }
+ loop_optimizer_finalize ();
free_dominance_info (CDI_DOMINATORS);
cleanup_cfg (0);
{
struct df_ref *use = DF_USES_GET (df, i);
if (use)
- if (loops.num == 0
+ if (!current_loops
|| DF_REF_TYPE (use) == DF_REF_REG_USE
|| DF_REF_BB (use)->loop_father == NULL)
forward_propagate_into (use);