diff options
author | Richard Guenther <rguenther@suse.de> | 2009-11-30 10:38:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-11-30 10:38:09 +0000 |
commit | e68c7b43067cf63f3783238073193ea2ab2fe525 (patch) | |
tree | 19cb3c61a0f595e0df10c4b6c060c1b0fef68c5c /gcc | |
parent | 831b9ef8f0c8f6a068aa34bcccac81f7405f8d1e (diff) | |
download | gcc-e68c7b43067cf63f3783238073193ea2ab2fe525.zip gcc-e68c7b43067cf63f3783238073193ea2ab2fe525.tar.gz gcc-e68c7b43067cf63f3783238073193ea2ab2fe525.tar.bz2 |
tree-into-ssa.c (insert_phi_nodes): Add PHI nodes in variable UID order.
2009-11-30 Richard Guenther <rguenther@suse.de>
* tree-into-ssa.c (insert_phi_nodes): Add PHI nodes in
variable UID order.
From-SVN: r154776
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-into-ssa.c | 28 |
2 files changed, 27 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index defb342..e9b2e73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2009-11-30 Richard Guenther <rguenther@suse.de> + * tree-into-ssa.c (insert_phi_nodes): Add PHI nodes in + variable UID order. + +2009-11-30 Richard Guenther <rguenther@suse.de> + * tree-dump.c (dump_option_value_in): Add TDF_NOUID. * tree-pass.h (TDF_NOUID): Likewise. * print-rtl.c: Include tree-pass.h. diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index d6f659c..243fe77 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -1151,27 +1151,43 @@ static void insert_phi_nodes (bitmap *dfs) { referenced_var_iterator rvi; + bitmap_iterator bi; tree var; + bitmap vars; + unsigned uid; timevar_push (TV_TREE_INSERT_PHI_NODES); + /* Do two stages to avoid code generation differences for UID + differences but no UID ordering differences. */ + + vars = BITMAP_ALLOC (NULL); FOR_EACH_REFERENCED_VAR (var, rvi) { struct def_blocks_d *def_map; - bitmap idf; def_map = find_def_blocks_for (var); if (def_map == NULL) continue; if (get_phi_state (var) != NEED_PHI_STATE_NO) - { - idf = compute_idf (def_map->def_blocks, dfs); - insert_phi_nodes_for (var, idf, false); - BITMAP_FREE (idf); - } + bitmap_set_bit (vars, DECL_UID (var)); } + EXECUTE_IF_SET_IN_BITMAP (vars, 0, uid, bi) + { + tree var = referenced_var (uid); + struct def_blocks_d *def_map; + bitmap idf; + + def_map = find_def_blocks_for (var); + idf = compute_idf (def_map->def_blocks, dfs); + insert_phi_nodes_for (var, idf, false); + BITMAP_FREE (idf); + } + + BITMAP_FREE (vars); + timevar_pop (TV_TREE_INSERT_PHI_NODES); } |