diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-29 19:26:47 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-29 19:26:47 +0000 |
commit | c4aa078796bd9c7237e0ac5ea4ab7553106f199d (patch) | |
tree | 98a5e7f47a887d71b7ce051eac4583deee5a6dac /gcc/tree-dfa.c | |
parent | e34f5cd313173ac0144aeb70ab96e50fc36605ba (diff) | |
download | gcc-c4aa078796bd9c7237e0ac5ea4ab7553106f199d.tar.gz |
2009-08-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151199
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r-- | gcc/tree-dfa.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 1067a439b44..4147a286669 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 |