aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog19
-rw-r--r--gcc/cfgloop.h7
-rw-r--r--gcc/loop-init.c12
-rw-r--r--gcc/loop-iv.c8
4 files changed, 32 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 440d3a1..ef6f7fc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,22 @@
+2013-04-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/56921
+ * cfgloop.h (struct loop): Add simple_loop_desc member.
+ (struct niter_desc): Mark with GTY(()).
+ (simple_loop_desc): Do not use aux field but simple_loop_desc.
+ * loop-iv.c (get_simple_loop_desc): Likewise.
+ (free_simple_loop_desc): Likewise.
+
+ Revert
+ 2013-04-16 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/56921
+ * loop-init.c (pass_rtl_move_loop_invariants): Add
+ TODO_do_not_ggc_collect to todo_flags_finish.
+ (pass_rtl_unswitch): Same.
+ (pass_rtl_unroll_and_peel_loops): Same.
+ (pass_rtl_doloop): Same.
+
2013-04-17 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): New.
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 01cef51..29ac6c4 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -172,6 +172,9 @@ struct GTY ((chain_next ("%h.next"))) loop {
/* Head of the cyclic list of the exits of the loop. */
struct loop_exit *exits;
+
+ /* Number of iteration analysis data for RTL. */
+ struct niter_desc *simple_loop_desc;
};
/* Flags for state of loop structure. */
@@ -372,7 +375,7 @@ struct rtx_iv
/* The description of an exit from the loop and of the number of iterations
till we take the exit. */
-struct niter_desc
+struct GTY(()) niter_desc
{
/* The edge out of the loop. */
edge out_edge;
@@ -425,7 +428,7 @@ extern void free_simple_loop_desc (struct loop *loop);
static inline struct niter_desc *
simple_loop_desc (struct loop *loop)
{
- return (struct niter_desc *) loop->aux;
+ return loop->simple_loop_desc;
}
/* Accessors for the loop structures. */
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index d5116ac..92d621e 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -434,8 +434,7 @@ struct rtl_opt_pass pass_rtl_move_loop_invariants =
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_verify |
- TODO_df_finish | TODO_verify_rtl_sharing
- | TODO_do_not_ggc_collect /* todo_flags_finish */
+ TODO_df_finish | TODO_verify_rtl_sharing /* todo_flags_finish */
}
};
@@ -471,8 +470,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_rtl_sharing
- | TODO_do_not_ggc_collect /* todo_flags_finish */
+ TODO_verify_rtl_sharing, /* todo_flags_finish */
}
};
@@ -521,8 +519,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_peel_loops =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_rtl_sharing
- | TODO_do_not_ggc_collect /* todo_flags_finish */
+ TODO_verify_rtl_sharing, /* todo_flags_finish */
}
};
@@ -564,7 +561,6 @@ struct rtl_opt_pass pass_rtl_doloop =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_rtl_sharing
- | TODO_do_not_ggc_collect /* todo_flags_finish */
+ TODO_verify_rtl_sharing /* todo_flags_finish */
}
};
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 0847307..5695e29 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -3016,10 +3016,10 @@ get_simple_loop_desc (struct loop *loop)
/* At least desc->infinite is not always initialized by
find_simple_loop_exit. */
- desc = XCNEW (struct niter_desc);
+ desc = ggc_alloc_cleared_niter_desc ();
iv_analysis_loop_init (loop);
find_simple_exit (loop, desc);
- loop->aux = desc;
+ loop->simple_loop_desc = desc;
if (desc->simple_p && (desc->assumptions || desc->infinite))
{
@@ -3069,6 +3069,6 @@ free_simple_loop_desc (struct loop *loop)
if (!desc)
return;
- free (desc);
- loop->aux = NULL;
+ ggc_free (desc);
+ loop->simple_loop_desc = NULL;
}