/* Called once at initialization time. */
void
-init_flow (void)
+init_flow (struct function *the_fun)
{
- if (!cfun->cfg)
- cfun->cfg = GGC_CNEW (struct control_flow_graph);
- n_edges = 0;
- ENTRY_BLOCK_PTR = GGC_CNEW (struct basic_block_def);
- ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
- EXIT_BLOCK_PTR = GGC_CNEW (struct basic_block_def);
- EXIT_BLOCK_PTR->index = EXIT_BLOCK;
- ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
- EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
+ if (!the_fun->cfg)
+ the_fun->cfg = GGC_CNEW (struct control_flow_graph);
+ n_edges_for_function (the_fun) = 0;
+ ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)
+ = GGC_CNEW (struct basic_block_def);
+ ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->index = ENTRY_BLOCK;
+ EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)
+ = GGC_CNEW (struct basic_block_def);
+ EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->index = EXIT_BLOCK;
+ ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->next_bb
+ = EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun);
+ EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->prev_bb
+ = ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun);
}
\f
/* Helper function for remove_edge and clear_edges. Frees edge structure
fprintf (file, "%d registers.\n", max);
for (i = FIRST_PSEUDO_REGISTER; i < max; i++)
{
- enum reg_class class, altclass;
+ enum reg_class rclass, altclass;
if (regstat_n_sets_and_refs)
fprintf (file, "\nRegister %d used %d times across %d insns",
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
- class = reg_preferred_class (i);
+ rclass = reg_preferred_class (i);
altclass = reg_alternate_class (i);
- if (class != GENERAL_REGS || altclass != ALL_REGS)
+ if (rclass != GENERAL_REGS || altclass != ALL_REGS)
{
- if (altclass == ALL_REGS || class == ALL_REGS)
- fprintf (file, "; pref %s", reg_class_names[(int) class]);
+ if (altclass == ALL_REGS || rclass == ALL_REGS)
+ fprintf (file, "; pref %s", reg_class_names[(int) rclass]);
else if (altclass == NO_REGS)
- fprintf (file, "; %s or none", reg_class_names[(int) class]);
+ fprintf (file, "; %s or none", reg_class_names[(int) rclass]);
else
fprintf (file, "; pref %s, else %s",
- reg_class_names[(int) class],
+ reg_class_names[(int) rclass],
reg_class_names[(int) altclass]);
}