* 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.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r97903
+2005-04-09 Jan Hubicka <jh@suse.cz>
+ Steven Bosscher <stevenb@suse.de>
+
+ * 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 <edelsohn@gnu.org>
* config/rs6000/predicates.md (altivec_register_operand): Remove
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;
}
/* 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++)
{
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;
/* 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;
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)
int stack_top;
sbitmap on_stack;
edge *edges, e;
- unsigned n_edges, i;
+ unsigned num_edges, i;
if (!(from->flags & BB_IRREDUCIBLE_LOOP))
return;
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];
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
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)
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);
}
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);
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);
{
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";
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;