/* 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,
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"
/* 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);
{
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)
}
}
#endif
- remove_phi_node (phi, NULL_TREE);
+ remove_phi_node (phi, NULL_TREE, true);
}
}
}
/* 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);
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);
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 ();
/* 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;