aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloop.h
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/cfgloop.h
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/cfgloop.h')
-rw-r--r--gcc/cfgloop.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 4c33c9c..47892ea 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -39,7 +39,7 @@ enum lpt_dec
LPT_UNROLL_STUPID
};
-struct lpt_decision
+struct lpt_decision GTY (())
{
enum lpt_dec decision;
unsigned times;
@@ -47,7 +47,7 @@ struct lpt_decision
/* The structure describing a bound on number of iterations of a loop. */
-struct nb_iter_bound
+struct nb_iter_bound GTY ((chain_next ("%h.next")))
{
/* The statement STMT is executed at most ... */
tree stmt;
@@ -72,10 +72,10 @@ struct nb_iter_bound
/* Description of the loop exit. */
-struct loop_exit
+struct loop_exit GTY (())
{
/* The exit edge. */
- edge e;
+ struct edge_def *e;
/* Previous and next exit in the list of the exits of the loop. */
struct loop_exit *prev;
@@ -88,18 +88,19 @@ struct loop_exit
typedef struct loop *loop_p;
DEF_VEC_P (loop_p);
DEF_VEC_ALLOC_P (loop_p, heap);
+DEF_VEC_ALLOC_P (loop_p, gc);
/* Structure to hold information for each natural loop. */
-struct loop
+struct loop GTY ((chain_next ("%h.next")))
{
/* Index into loops array. */
int num;
/* Basic block of loop header. */
- basic_block header;
+ struct basic_block_def *header;
/* Basic block of loop latch. */
- basic_block latch;
+ struct basic_block_def *latch;
/* For loop unrolling/peeling decision. */
struct lpt_decision lpt_decision;
@@ -114,7 +115,7 @@ struct loop
unsigned num_nodes;
/* Superloops of the loop, starting with the outermost loop. */
- VEC (loop_p, heap) *superloops;
+ VEC (loop_p, gc) *superloops;
/* The first inner (child) loop or NULL if innermost loop. */
struct loop *inner;
@@ -126,7 +127,7 @@ struct loop
struct loop *copy;
/* Auxiliary info specific to a pass. */
- void *aux;
+ PTR GTY ((skip (""))) aux;
/* The number of times the latch of the loop is executed.
This is an INTEGER_CST or an expression containing symbolic
@@ -158,7 +159,7 @@ struct loop
struct nb_iter_bound *bounds;
/* Head of the cyclic list of the exits of the loop. */
- struct loop_exit exits;
+ struct loop_exit *exits;
};
/* Flags for state of loop structure. */
@@ -177,18 +178,18 @@ enum
#define AVOID_CFG_MODIFICATIONS (LOOPS_MAY_HAVE_MULTIPLE_LATCHES)
/* Structure to hold CFG information about natural loops within a function. */
-struct loops
+struct loops GTY (())
{
/* State of loops. */
int state;
/* Array of the loops. */
- VEC (loop_p, heap) *larray;
+ VEC (loop_p, gc) *larray;
/* Maps edges to the list of their descriptions as loop exits. Edges
whose sources or destinations have loop_father == NULL (which may
happen during the cfg manipulations) should not appear in EXITS. */
- htab_t exits;
+ htab_t GTY((param_is (struct loop_exit))) exits;
/* Pointer to root of loop hierarchy tree. */
struct loop *tree_root;
@@ -428,7 +429,7 @@ loop_outer (const struct loop *loop)
/* Returns the list of loops in current_loops. */
-static inline VEC (loop_p, heap) *
+static inline VEC (loop_p, gc) *
get_loops (void)
{
if (!current_loops)