/* Lower complex number operations to scalar operations.
- Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
/* If we've nothing assigned, and the value we're given is already stable,
then install that as the value for this SSA_NAME. This preemptively
copy-propagates the value, which avoids unnecessary memory allocation. */
- else if (is_gimple_min_invariant (value))
+ else if (is_gimple_min_invariant (value)
+ && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ssa_name))
{
VEC_replace (tree, complex_ssa_name_components, ssa_name_index, value);
return NULL;
}
}
-/* Mark each virtual op in STMT for ssa update. */
-
-static void
-update_all_vops (gimple stmt)
-{
- ssa_op_iter iter;
- tree sym;
-
- FOR_EACH_SSA_TREE_OPERAND (sym, stmt, iter, SSA_OP_ALL_VIRTUALS)
- {
- if (TREE_CODE (sym) == SSA_NAME)
- sym = SSA_NAME_VAR (sym);
- mark_sym_for_renaming (sym);
- }
-}
-
-
/* Expand a complex move to scalars. */
static void
}
else
{
- update_all_vops (stmt);
if (gimple_assign_rhs_code (stmt) != COMPLEX_EXPR)
{
r = extract_component (gsi, rhs, 0, true);
gimple_return_set_retval (stmt, lhs);
}
- update_all_vops (stmt);
update_stmt (stmt);
}
}
enum machine_mode mode;
enum built_in_function bcode;
tree fn, type, lhs;
- gimple stmt;
+ gimple old_stmt, stmt;
- stmt = gsi_stmt (*gsi);
- lhs = gimple_assign_lhs (stmt);
+ old_stmt = gsi_stmt (*gsi);
+ lhs = gimple_assign_lhs (old_stmt);
type = TREE_TYPE (lhs);
mode = TYPE_MODE (type);
stmt = gimple_build_call (fn, 4, ar, ai, br, bi);
gimple_call_set_lhs (stmt, lhs);
update_stmt (stmt);
- gsi_replace (gsi, stmt, true);
+ gsi_replace (gsi, stmt, false);
+
+ if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt))
+ gimple_purge_dead_eh_edges (gsi_bb (*gsi));
if (gimple_in_ssa_p (cfun))
{