tree-flow.h (name_mappings_registered_p): Declare.

* tree-flow.h (name_mappings_registered_p): Declare.
	* tree-into-ssa.c (name_mappings_registered_p): New function.
	* tree-cfg.c (tree_can_merge_blocks_p): Check
	name_mappings_registered_p instead of need_ssa_update_p.

From-SVN: r118732
This commit is contained in:
Zdenek Dvorak 2006-11-12 21:59:28 +01:00 committed by Zdenek Dvorak
parent 4d2280f60d
commit 8f8bb1d200
4 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2006-11-12 Zdenek Dvorak <dvorakz@suse.cz>
* tree-flow.h (name_mappings_registered_p): Declare.
* tree-into-ssa.c (name_mappings_registered_p): New function.
* tree-cfg.c (tree_can_merge_blocks_p): Check
name_mappings_registered_p instead of need_ssa_update_p.
2006-11-12 Zdenek Dvorak <dvorakz@suse.cz>
* tree-ssa-loop.c (tree_vectorize): Return the result of

View File

@ -1200,11 +1200,13 @@ tree_can_merge_blocks_p (basic_block a, basic_block b)
return false;
/* It must be possible to eliminate all phi nodes in B. If ssa form
is not up-to-date, we cannot eliminate any phis. */
is not up-to-date, we cannot eliminate any phis; however, if only
some symbols as whole are marked for renaming, this is not a problem,
as phi nodes for those symbols are irrelevant in updating anyway. */
phi = phi_nodes (b);
if (phi)
{
if (need_ssa_update_p ())
if (name_mappings_registered_p ())
return false;
for (; phi; phi = PHI_CHAIN (phi))
@ -1242,7 +1244,6 @@ replace_uses_by (tree name, tree val)
edge e;
unsigned i;
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, name)
{
FOR_EACH_IMM_USE_ON_STMT (use, imm_iter)

View File

@ -716,6 +716,7 @@ void delete_update_ssa (void);
void register_new_name_mapping (tree, tree);
tree create_new_def_for (tree, tree, def_operand_p);
bool need_ssa_update_p (void);
bool name_mappings_registered_p (void);
bool name_registered_for_update_p (tree);
bitmap ssa_names_to_replace (void);
void release_ssa_name_after_update_ssa (tree name);

View File

@ -2659,6 +2659,13 @@ need_ssa_update_p (void)
return syms_to_rename || old_ssa_names || new_ssa_names;
}
/* Return true if SSA name mappings have been registered for SSA updating. */
bool
name_mappings_registered_p (void)
{
return repl_tbl && htab_elements (repl_tbl) > 0;
}
/* Return true if name N has been registered in the replacement table. */