aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-dfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r--gcc/tree-dfa.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 1067a43..4147a28 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -157,6 +157,32 @@ renumber_gimple_stmt_uids (void)
}
}
+/* Like renumber_gimple_stmt_uids, but only do work on the basic blocks
+ in BLOCKS, of which there are N_BLOCKS. Also renumbers PHIs. */
+
+void
+renumber_gimple_stmt_uids_in_blocks (basic_block *blocks, int n_blocks)
+{
+ int i;
+
+ set_gimple_stmt_max_uid (cfun, 0);
+ for (i = 0; i < n_blocks; i++)
+ {
+ basic_block bb = blocks[i];
+ gimple_stmt_iterator bsi;
+ for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi))
+ {
+ gimple stmt = gsi_stmt (bsi);
+ gimple_set_uid (stmt, inc_gimple_stmt_max_uid (cfun));
+ }
+ for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
+ {
+ gimple stmt = gsi_stmt (bsi);
+ gimple_set_uid (stmt, inc_gimple_stmt_max_uid (cfun));
+ }
+ }
+}
+
/* Create a new annotation for a tree T. */
tree_ann_common_t