aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-init.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-05-14 23:58:42 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-05-14 21:58:42 +0000
commit9e2f83a5e87d2956dd67b4ec2338426d07a730bc (patch)
tree61d0e4895414c91784867c1c8a939465c09eb6a4 /gcc/loop-init.c
parent9c49a5e4b3295ed1376f0457cc6178aa2f95cd60 (diff)
downloadgcc-9e2f83a5e87d2956dd67b4ec2338426d07a730bc.zip
gcc-9e2f83a5e87d2956dd67b4ec2338426d07a730bc.tar.gz
gcc-9e2f83a5e87d2956dd67b4ec2338426d07a730bc.tar.bz2
tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate struct nb_iter_bound.
* 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. From-SVN: r124727
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r--gcc/loop-init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index f1c3df2..3aa6527 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -31,6 +31,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "tree-pass.h"
#include "timevar.h"
#include "flags.h"
+#include "ggc.h"
/* Initialize loop structures. This is used by the tree and RTL loop
@@ -43,7 +44,7 @@ loop_optimizer_init (unsigned flags)
struct loops *loops;
gcc_assert (!current_loops);
- loops = XCNEW (struct loops);
+ loops = GGC_CNEW (struct loops);
/* Find the loops. */
@@ -116,7 +117,7 @@ loop_optimizer_finalize (void)
if (current_loops->state & LOOPS_HAVE_RECORDED_EXITS)
release_recorded_exits ();
flow_loops_free (current_loops);
- free (current_loops);
+ ggc_free (current_loops);
current_loops = NULL;
FOR_ALL_BB (bb)