OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-outof-ssa.c
index f591eb5..d01c663 100644 (file)
@@ -1,12 +1,12 @@
 /* Convert a program in SSA form into Normal form.
-   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    Contributed by Andrew Macleod <amacleod@redhat.com>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,9 +15,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -125,7 +124,7 @@ create_temp (tree t)
   /* add_referenced_var will create the annotation and set up some
      of the flags in the annotation.  However, some flags we need to
      inherit from our original variable.  */
-  var_ann (tmp)->symbol_mem_tag = var_ann (t)->symbol_mem_tag;
+  set_symbol_mem_tag (tmp, symbol_mem_tag (t));
   if (is_call_clobbered (t))
     mark_call_clobbered (tmp, var_ann (t)->escape_mask);
 
@@ -141,7 +140,7 @@ insert_copy_on_edge (edge e, tree dest, tree src)
 {
   tree copy;
 
-  copy = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (dest), dest, src);
+  copy = build_gimple_modify_stmt (dest, src);
   set_is_used (dest);
 
   if (TREE_CODE (src) == ADDR_EXPR)
@@ -639,7 +638,7 @@ eliminate_virtual_phis (void)
                    }
                }
 #endif
-             remove_phi_node (phi, NULL_TREE);
+             remove_phi_node (phi, NULL_TREE, true);
            }
        }
     }
@@ -796,7 +795,7 @@ same_stmt_list_p (edge e)
 /* Return TRUE if S1 and S2 are equivalent copies.  */
 
 static inline bool
-identical_copies_p (tree s1, tree s2)
+identical_copies_p (const_tree s1, const_tree s2)
 {
 #ifdef ENABLE_CHECKING
   gcc_assert (TREE_CODE (s1) == GIMPLE_MODIFY_STMT);
@@ -822,7 +821,7 @@ identical_copies_p (tree s1, tree s2)
    contain the same sequence of copies.  */
 
 static inline bool 
-identical_stmt_lists_p (edge e1, edge e2)
+identical_stmt_lists_p (const_edge e1, const_edge e2)
 {
   tree t1 = PENDING_STMT (e1);
   tree t2 = PENDING_STMT (e2);
@@ -1170,19 +1169,16 @@ remove_ssa_form (bool perform_ter)
   if (values)
     free (values);
 
-  /* Remove phi nodes which have been translated back to real variables.  */
+  /* Remove PHI nodes which have been translated back to real variables.  */
   FOR_EACH_BB (bb)
     {
       for (phi = phi_nodes (bb); phi; phi = next)
        {
          next = PHI_CHAIN (phi);
-         remove_phi_node (phi, NULL_TREE);
+         remove_phi_node (phi, NULL_TREE, true);
        }
     }
 
-  /* we no longer maintain the SSA operand cache at this point.  */
-  fini_ssa_operands ();
-
   /* If any copies were inserted on edges, analyze and insert them now.  */
   perform_edge_inserts ();
 
@@ -1257,8 +1253,8 @@ insert_backedge_copies (void)
 
                  /* Create a new instance of the underlying variable of the 
                     PHI result.  */
-                 stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (result_var),
-                                NULL_TREE, PHI_ARG_DEF (phi, i));
+                 stmt = build_gimple_modify_stmt (NULL_TREE,
+                                                  PHI_ARG_DEF (phi, i));
                  name = make_ssa_name (result_var, stmt);
                  GIMPLE_STMT_OPERAND (stmt, 0) = name;