summaryrefslogtreecommitdiff
path: root/gcc/fwprop.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-20 04:51:47 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-20 04:51:47 +0000
commit725b196ef1c17ba12255c2badbdd51e36761e2fa (patch)
tree8f0d473dbf3e7ac02950c8f90bc7545a3ffab15d /gcc/fwprop.c
parent25b4f14993fdc124ffc92eca32c61612005c41ae (diff)
downloadgcc-725b196ef1c17ba12255c2badbdd51e36761e2fa.tar.gz
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 loo git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r--gcc/fwprop.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index fb601e1a4f0..9dbf4749e2e 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -104,7 +104,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
where the first two insns are now dead. */
-static struct loops loops;
static struct df *df;
static int num_changes;
@@ -859,7 +858,7 @@ forward_propagate_into (struct df_ref *use)
/* 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;
@@ -896,7 +895,7 @@ fwprop_init (void)
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. */
@@ -912,10 +911,7 @@ fwprop_done (void)
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);
@@ -955,7 +951,7 @@ fwprop (void)
{
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);