From 391886c8e0153d41b3ab4daf4d2dd1d923d9c50f Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 13 Aug 2012 13:49:54 +0000 Subject: basic-block.h (struct basic_block): Remove loop_depth member, move flags and index members next to each other. 2012-08-13 Richard Guenther * basic-block.h (struct basic_block): Remove loop_depth member, move flags and index members next to each other. * cfgloop.h (bb_loop_depth): New inline function. * cfghooks.c (split_block): Do not set loop_depth. (duplicate_block): Likewise. * cfgloop.c (flow_loop_nodes_find): Likewise. (flow_loops_find): Likewise. (add_bb_to_loop): Likewise. (remove_bb_from_loops): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. * gimple-streamer-in.c (input_bb): Do not stream loop_depth. * gimple-streamer-out.c (output_bb): Likewise. * bt-load.c: Include cfgloop.h. (migrate_btr_defs): Use bb_loop_depth. * cfg.c (dump_bb_info): Likewise. * final.c (compute_alignments): Likewise. * ira.c (update_equiv_regs): Likewise. * tree-ssa-copy.c (init_copy_prop): Likewise. * tree-ssa-dom.c (loop_depth_of_name): Likewise. * tree-ssa-forwprop.c: Include cfgloop.h. (forward_propagate_addr_expr): Use bb_loop_depth. * tree-ssa-pre.c (insert_into_preds_of_block): Likewise. * tree-ssa-sink.c (select_best_block): Likewise. * ipa-inline-analysis.c: Include cfgloop.h. (estimate_function_body_sizes): Use bb_loop_depth. * Makefile.in (tree-ssa-forwprop.o): Depend on $(CFGLOOP_H). (ipa-inline-analysis.o): Likewise. (bt-load.o): Likewise. * gcc.dg/tree-prof/update-loopch.c: Adjust. From-SVN: r190346 --- gcc/cfgloop.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'gcc/cfgloop.c') diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 95c173a..0c51682 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -229,10 +229,8 @@ flow_loop_nodes_find (basic_block header, struct loop *loop) int num_nodes = 1; edge latch; edge_iterator latch_ei; - unsigned depth = loop_depth (loop); header->loop_father = loop; - header->loop_depth = depth; FOR_EACH_EDGE (latch, latch_ei, loop->header->preds) { @@ -243,7 +241,6 @@ flow_loop_nodes_find (basic_block header, struct loop *loop) num_nodes++; VEC_safe_push (basic_block, heap, stack, latch->src); latch->src->loop_father = loop; - latch->src->loop_depth = depth; while (!VEC_empty (basic_block, stack)) { @@ -260,7 +257,6 @@ flow_loop_nodes_find (basic_block header, struct loop *loop) if (ancestor->loop_father != loop) { ancestor->loop_father = loop; - ancestor->loop_depth = depth; num_nodes++; VEC_safe_push (basic_block, heap, stack, ancestor); } @@ -365,7 +361,7 @@ init_loops_structure (struct loops *loops, unsigned num_loops) } /* Find all the natural loops in the function and save in LOOPS structure and - recalculate loop_depth information in basic block structures. + recalculate loop_father information in basic block structures. Return the number of natural loops found. */ int @@ -404,8 +400,6 @@ flow_loops_find (struct loops *loops) { edge_iterator ei; - header->loop_depth = 0; - /* If we have an abnormal predecessor, do not consider the loop (not worth the problems). */ if (bb_has_abnormal_pred (header)) @@ -1185,7 +1179,6 @@ add_bb_to_loop (basic_block bb, struct loop *loop) gcc_assert (bb->loop_father == NULL); bb->loop_father = loop; - bb->loop_depth = loop_depth (loop); loop->num_nodes++; FOR_EACH_VEC_ELT (loop_p, loop->superloops, i, ploop) ploop->num_nodes++; @@ -1215,7 +1208,6 @@ remove_bb_from_loops (basic_block bb) FOR_EACH_VEC_ELT (loop_p, loop->superloops, i, ploop) ploop->num_nodes--; bb->loop_father = NULL; - bb->loop_depth = 0; FOR_EACH_EDGE (e, ei, bb->succs) { -- cgit v1.1