From c75de2f766320b156ea827dee2c913cbf6e2d5e4 Mon Sep 17 00:00:00 2001 From: hubicka Date: Sat, 9 Apr 2005 16:09:11 +0000 Subject: [PATCH] * cfglayout.c (copy_bbs): Rename n_edges to num_edges. * cfgloop.c (get_loop_exit_edges): Likewise. * cfgloopmanip.c (fix_irreducible_loops): Likewise. (unloop): Likewise. * loop-unroll.c (analyze_insns_in_loop): Likewise. * tree-cfg.c (dump_cfg_status): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97903 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++++++++ gcc/cfglayout.c | 6 +++--- gcc/cfgloop.c | 4 ++-- gcc/cfgloopmanip.c | 18 +++++++++--------- gcc/loop-unroll.c | 6 +++--- gcc/tree-cfg.c | 10 +++++----- 6 files changed, 32 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b5ad905d40..b01ba2d53bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-04-09 Jan Hubicka + Steven Bosscher + + * cfglayout.c (copy_bbs): Rename n_edges to num_edges. + * cfgloop.c (get_loop_exit_edges): Likewise. + * cfgloopmanip.c (fix_irreducible_loops): Likewise. + (unloop): Likewise. + * loop-unroll.c (analyze_insns_in_loop): Likewise. + * tree-cfg.c (dump_cfg_status): Likewise. + 2005-04-09 David Edelsohn * config/rs6000/predicates.md (altivec_register_operand): Remove diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index 6b6006291d7..22c93f11420 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -1228,7 +1228,7 @@ end: void copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs, - edge *edges, unsigned n_edges, edge *new_edges, + edge *edges, unsigned num_edges, edge *new_edges, struct loop *base) { unsigned i, j; @@ -1267,7 +1267,7 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs, } /* Redirect edges. */ - for (j = 0; j < n_edges; j++) + for (j = 0; j < num_edges; j++) new_edges[j] = NULL; for (i = 0; i < n; i++) { @@ -1277,7 +1277,7 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs, FOR_EACH_EDGE (e, ei, new_bb->succs) { - for (j = 0; j < n_edges; j++) + for (j = 0; j < num_edges; j++) if (edges[j] && edges[j]->src == bb && edges[j]->dest == e->dest) new_edges[j] = e; diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 0e258c64a34..553fd981faa 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -926,7 +926,7 @@ get_loop_body_in_bfs_order (const struct loop *loop) /* Gets exit edges of a LOOP, returning their number in N_EDGES. */ edge * -get_loop_exit_edges (const struct loop *loop, unsigned int *n_edges) +get_loop_exit_edges (const struct loop *loop, unsigned int *num_edges) { edge *edges, e; unsigned i, n; @@ -942,7 +942,7 @@ get_loop_exit_edges (const struct loop *loop, unsigned int *n_edges) if (!flow_bb_inside_loop_p (loop, e->dest)) n++; edges = xmalloc (n * sizeof (edge)); - *n_edges = n; + *num_edges = n; n = 0; for (i = 0; i < loop->num_nodes; i++) FOR_EACH_EDGE (e, ei, body[i]->succs) diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 50fad382f65..0a369787ebf 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -252,7 +252,7 @@ fix_irreducible_loops (basic_block from) int stack_top; sbitmap on_stack; edge *edges, e; - unsigned n_edges, i; + unsigned num_edges, i; if (!(from->flags & BB_IRREDUCIBLE_LOOP)) return; @@ -278,16 +278,16 @@ fix_irreducible_loops (basic_block from) bb->flags &= ~BB_IRREDUCIBLE_LOOP; if (bb->loop_father->header == bb) - edges = get_loop_exit_edges (bb->loop_father, &n_edges); + edges = get_loop_exit_edges (bb->loop_father, &num_edges); else { - n_edges = EDGE_COUNT (bb->succs); - edges = xmalloc (n_edges * sizeof (edge)); + num_edges = EDGE_COUNT (bb->succs); + edges = xmalloc (num_edges * sizeof (edge)); FOR_EACH_EDGE (e, ei, bb->succs) edges[ei.index] = e; } - for (i = 0; i < n_edges; i++) + for (i = 0; i < num_edges; i++) { e = edges[i]; @@ -574,7 +574,7 @@ unloop (struct loops *loops, struct loop *loop) unsigned i, n; basic_block latch = loop->latch; edge *edges; - unsigned n_edges; + unsigned num_edges; /* This is relatively straightforward. The dominators are unchanged, as loop header dominates loop latch, so the only thing we have to care of @@ -583,7 +583,7 @@ unloop (struct loops *loops, struct loop *loop) its work. */ body = get_loop_body (loop); - edges = get_loop_exit_edges (loop, &n_edges); + edges = get_loop_exit_edges (loop, &num_edges); n = loop->num_nodes; for (i = 0; i < n; i++) if (body[i]->loop_father == loop) @@ -612,10 +612,10 @@ unloop (struct loops *loops, struct loop *loop) update the irreducible marks inside its body. While it is certainly possible to do, it is a bit complicated and this situation should be very rare, so we just remark all loops in this case. */ - for (i = 0; i < n_edges; i++) + for (i = 0; i < num_edges; i++) if (edges[i]->flags & EDGE_IRREDUCIBLE_LOOP) break; - if (i != n_edges) + if (i != num_edges) mark_irreducible_loops (loops); free (edges); } diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index e44dae69383..ab3828d9d02 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -1640,14 +1640,14 @@ static struct opt_info * analyze_insns_in_loop (struct loop *loop) { basic_block *body, bb; - unsigned i, n_edges = 0; + unsigned i, num_edges = 0; struct opt_info *opt_info = xcalloc (1, sizeof (struct opt_info)); rtx insn; struct iv_to_split *ivts = NULL; struct var_to_expand *ves = NULL; PTR *slot1; PTR *slot2; - edge *edges = get_loop_exit_edges (loop, &n_edges); + edge *edges = get_loop_exit_edges (loop, &num_edges); bool can_apply = false; iv_analysis_loop_init (loop); @@ -1667,7 +1667,7 @@ analyze_insns_in_loop (struct loop *loop) else opt_info->loop_preheader = loop_preheader_edge (loop)->src; - if (n_edges == 1 + if (num_edges == 1 && !(edges[0]->flags & EDGE_COMPLEX)) { opt_info->loop_exit = loop_split_edge_with (edges[0], NULL_RTX); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 38d8215d03c..d54408cc8c2 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2551,7 +2551,7 @@ dump_cfg_stats (FILE *file) { static long max_num_merged_labels = 0; unsigned long size, total = 0; - int n_edges; + long num_edges; basic_block bb; const char * const fmt_str = "%-30s%-13s%12s\n"; const char * const fmt_str_1 = "%-30s%13d%11lu%c\n"; @@ -2572,12 +2572,12 @@ dump_cfg_stats (FILE *file) fprintf (file, fmt_str_1, "Basic blocks", n_basic_blocks, SCALE (size), LABEL (size)); - n_edges = 0; + num_edges = 0; FOR_EACH_BB (bb) - n_edges += EDGE_COUNT (bb->succs); - size = n_edges * sizeof (struct edge_def); + num_edges += EDGE_COUNT (bb->succs); + size = num_edges * sizeof (struct edge_def); total += size; - fprintf (file, fmt_str_1, "Edges", n_edges, SCALE (size), LABEL (size)); + fprintf (file, fmt_str_1, "Edges", num_edges, SCALE (size), LABEL (size)); size = n_basic_blocks * sizeof (struct bb_ann_d); total += size; -- 2.11.0