OSDN Git Service

* tree-flow.h (name_mappings_registered_p): Declare.
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Nov 2006 20:59:28 +0000 (20:59 +0000)
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Nov 2006 20:59:28 +0000 (20:59 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118732 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-cfg.c
gcc/tree-flow.h
gcc/tree-into-ssa.c

index bf52ce8..22b956f 100644 (file)
@@ -1,5 +1,12 @@
 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
        vectorize_loops.
        * tree-vectorizer.c (vectorize_loops): Return TODO_cleanup_cfg
index ab5a234..7c397aa 100644 (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)
index 8013804..61910f9 100644 (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);
index 14a50b6..3bcddfe 100644 (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.  */