int n_basic_blocks;
+/* First free basic block number. */
+
+int last_basic_block;
+
/* Number of edges in the current function. */
int n_edges;
b->prev_bb->next_bb = b->next_bb;
}
+/* Sequentially order blocks and compact the arrays. */
+void
+compact_blocks ()
+{
+ int i;
+ basic_block bb;
+
+ i = 0;
+ FOR_EACH_BB (bb)
+ {
+ BASIC_BLOCK (i) = bb;
+ bb->index = i;
+ i++;
+ }
+
+ if (i != n_basic_blocks)
+ abort ();
+
+ last_basic_block = n_basic_blocks;
+}
+
-/* Remove block B from the basic block array and compact behind it. */
+/* Remove block B from the basic block array. */
void
-expunge_block_nocompact (b)
+expunge_block (b)
basic_block b;
{
unlink_block (b);
+ BASIC_BLOCK (b->index) = NULL;
+ n_basic_blocks--;
/* Invalidate data to make bughunting easier. */
memset (b, 0, sizeof *b);
b->succ = (edge) first_deleted_block;
first_deleted_block = (basic_block) b;
}
-
-void
-expunge_block (b)
- basic_block b;
-{
- int i, n = n_basic_blocks;
-
- for (i = b->index; i + 1 < n; ++i)
- {
- basic_block x = BASIC_BLOCK (i + 1);
- BASIC_BLOCK (i) = x;
- x->index = i;
- }
-
- n_basic_blocks--;
- basic_block_info->num_elements--;
-
- expunge_block_nocompact (b);
-}
\f
/* Create an edge connecting SRC and DST with FLAGS optionally using
edge cache CACHE. Return the new edge, NULL if already exist. */
fprintf (file, ", maybe hot");
if (probably_never_executed_bb_p (bb))
fprintf (file, ", probably never executed");
- fprintf (file, ".\n", bb->frequency);
+ fprintf (file, ".\n");
fprintf (file, "Predecessors: ");
for (e = bb->pred; e; e = e->pred_next)