diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-20 08:31:13 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-20 08:31:13 +0000 |
commit | 243f24c5b968096871674ab2d4131ca87da947af (patch) | |
tree | ac14daea0ef0dd3b428a5ec40c1293f79e2d5e54 /gcc/fwprop.c | |
parent | 9519f67b7354793ab2f76f4e10b48b258e5d6d63 (diff) | |
download | gcc-243f24c5b968096871674ab2d4131ca87da947af.tar.gz |
2007-03-19 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/30907
* fwprop.c (forward_propagate_into): Never propagate inside a loop.
(fwprop_init): Always call loop_optimizer_initialize.
(fwprop_done): Always call loop_optimizer_finalize.
(fwprop): We always have loop info now.
(gate_fwprop_addr): Remove.
(pass_fwprop_addr): Use gate_fwprop as gate.
PR rtl-optimization/30841
* df-problems.c (df_ru_local_compute, df_rd_local_compute,
df_chain_alloc): Call df_reorganize_refs unconditionally.
* df-scan.c (df_rescan_blocks, df_reorganize_refs): Change
refs_organized to refs_organized_size.
(df_ref_create_structure): Use refs_organized_size instead of
bitmap_size if refs had been organized, and keep refs_organized_size
up-to-date.
* df.h (struct df_ref_info): Change refs_organized to
refs_organized_size.
(DF_DEFS_SIZE, DF_USES_SIZE): Use refs_organized_size instead of
bitmap_size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r-- | gcc/fwprop.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 6ce91836d45..106424efc96 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -862,10 +862,8 @@ forward_propagate_into (struct df_ref *use) if (DF_REF_FLAGS (def) & DF_REF_ARTIFICIAL) return; - /* Do not propagate loop invariant definitions inside the loop if - we are going to unroll. */ - if (current_loops - && DF_REF_BB (def)->loop_father != DF_REF_BB (use)->loop_father) + /* Do not propagate loop invariant definitions inside the loop. */ + if (DF_REF_BB (def)->loop_father != DF_REF_BB (use)->loop_father) return; /* Check if the use is still present in the insn! */ @@ -900,8 +898,7 @@ fwprop_init (void) loops and be careful about them. But we have to call flow_loops_find 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)) - loop_optimizer_init (0); + loop_optimizer_init (0); /* Now set up the dataflow problem (we only want use-def chains) and put the dataflow solver to work. */ @@ -915,10 +912,7 @@ static void fwprop_done (void) { df_finish (df); - - if (flag_rerun_cse_after_loop && (flag_unroll_loops || flag_peel_loops)) - loop_optimizer_finalize (); - + loop_optimizer_finalize (); free_dominance_info (CDI_DOMINATORS); cleanup_cfg (0); delete_trivially_dead_insns (get_insns (), max_reg_num ()); @@ -957,8 +951,7 @@ fwprop (void) { struct df_ref *use = DF_USES_GET (df, i); if (use) - if (!current_loops - || DF_REF_TYPE (use) == DF_REF_REG_USE + if (DF_REF_TYPE (use) == DF_REF_REG_USE || DF_REF_BB (use)->loop_father == NULL) forward_propagate_into (use); } @@ -985,13 +978,6 @@ struct tree_opt_pass pass_rtl_fwprop = 0 /* letter */ }; -static bool -gate_fwprop_addr (void) -{ - return optimize > 0 && flag_forward_propagate && flag_rerun_cse_after_loop - && (flag_unroll_loops || flag_peel_loops); -} - static unsigned int fwprop_addr (void) { @@ -1018,7 +1004,7 @@ fwprop_addr (void) struct tree_opt_pass pass_rtl_fwprop_addr = { "fwprop2", /* name */ - gate_fwprop_addr, /* gate */ + gate_fwprop, /* gate */ fwprop_addr, /* execute */ NULL, /* sub */ NULL, /* next */ |