summaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-14 21:58:42 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-14 21:58:42 +0000
commitccae4f9fe0b40687ca11e04e6bd2610b524843de (patch)
tree61d0e4895414c91784867c1c8a939465c09eb6a4 /gcc/tree-scalar-evolution.c
parentaf52226989a3a564863f9c212c521dc1bc6c635a (diff)
downloadgcc-ccae4f9fe0b40687ca11e04e6bd2610b524843de.tar.gz
* tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate
struct nb_iter_bound. (free_numbers_of_iterations_estimates_loop): Use ggc_free. * gengtype.c (open_base_files): Add cfhloop.h to the list of includes. * cfgloopmanip.c (place_new_loop): Vector larray is gc-allocated. * tree-scalar-evolution.c: Include gt-tree-scalar-evolution.h. (struct scev_info_str, scalar_evolution_info): Add GTY markers. (new_scev_info_str): Use GGC_NEW to allocate struct scev_info_str. (del_scev_info): Use ggc_free. (scev_initialize): Allocate scalar_evolution_info in gc memory. * loop-init.c: Include ggc.h. (loop_optimizer_init): Use GGC_CNEW to allocate struct loops. (loop_optimizer_finalize): Use ggc_free. * tree-ssa-loop.c (pass_tree_unswitch, pass_vectorize, pass_linear_transfom, pass_empty_loop, pass_complete_unroll, pass_iv_optimize): Add TODO_ggc_collect. * function.h (struct function): Remove skip marker from x_current_loops. * cfgloop.c: Include ggc.h. (flow_loops_free, flow_loop_free): Free the loop descriptions in gc memory. (establish_preds): Vector superloops is gc allocated. (alloc_loop): Allocate loop using GGC_CNEW. Allocate head of loop->exits list. (flow_loops_find): Vector larray is gc allocated. (loop_exit_free): Use ggc_free. (rescan_loop_exit): Use GGC_NEW to allocate struct loop_exit. Reflect that head of exits list is now not a part of struct loop. (record_loop_exits): Allocate exits table in gc memory. (get_loop_exit_edges, verify_loop_structure, single_exit): Reflect that head of exits list is now not a part of struct loop. * cfgloop.h (struct lpt_decision, struct nb_iter_bound, struct loop_exit): Add GTY marker. (struct loop): Add GTY marker. Make superloops vector gc allocated. Add skip marker to aux field. Make head of exits list a separate object. (struct loops): Add GTY marker. Make larray vector gc allocated. Add param marker to exits table. (get_loops): Type changed. * Makefile.in (tree-scalar-evolution.o): Add gt-tree-scalar-evolution.h dependency. (cfgloop.o, loop-init.o): Add ggc.h dependency. (GTFILES): Add cfgloop.h and tree-scalar-evolution.c. * basic-block.h (struct basic_block_def): Remove skip marker from loop_father field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 9fd5c786ebf..46831d7f573 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -258,7 +258,7 @@ static tree analyze_scalar_evolution_1 (struct loop *, tree, tree);
/* The cached information about a ssa name VAR, claiming that inside LOOP,
the value of VAR can be expressed as CHREC. */
-struct scev_info_str
+struct scev_info_str GTY(())
{
tree var;
tree chrec;
@@ -285,7 +285,7 @@ tree chrec_known;
static bitmap already_instantiated;
-static htab_t scalar_evolution_info;
+static GTY ((param_is (struct scev_info_str))) htab_t scalar_evolution_info;
/* Constructs a new SCEV_INFO_STR structure. */
@@ -295,7 +295,7 @@ new_scev_info_str (tree var)
{
struct scev_info_str *res;
- res = XNEW (struct scev_info_str);
+ res = GGC_NEW (struct scev_info_str);
res->var = var;
res->chrec = chrec_not_analyzed_yet;
@@ -326,7 +326,7 @@ eq_scev_info (const void *e1, const void *e2)
static void
del_scev_info (void *e)
{
- free (e);
+ ggc_free (e);
}
/* Get the index corresponding to VAR in the current LOOP. If
@@ -2746,8 +2746,12 @@ scev_initialize (void)
loop_iterator li;
struct loop *loop;
- scalar_evolution_info = htab_create (100, hash_scev_info,
- eq_scev_info, del_scev_info);
+ scalar_evolution_info = htab_create_alloc (100,
+ hash_scev_info,
+ eq_scev_info,
+ del_scev_info,
+ ggc_calloc,
+ ggc_free);
already_instantiated = BITMAP_ALLOC (NULL);
initialize_scalar_evolutions_analyzer ();
@@ -3008,3 +3012,5 @@ scev_const_prop (void)
}
return 0;
}
+
+#include "gt-tree-scalar-evolution.h"