OSDN Git Service

libgo: Update to weekly.2011-12-14.
[pf3gnuchains/gcc-fork.git] / gcc / tree-complex.c
index 77b5c6a..0547fcf 100644 (file)
@@ -174,7 +174,7 @@ init_parameter_lattice_values (void)
 {
   tree parm, ssa_name;
 
-  for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
+  for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = DECL_CHAIN (parm))
     if (is_complex_reg (parm)
        && var_ann (parm) != NULL
        && (ssa_name = gimple_default_def (cfun, parm)) != NULL_TREE)
@@ -662,12 +662,16 @@ static void
 update_complex_assignment (gimple_stmt_iterator *gsi, tree r, tree i)
 {
   gimple_stmt_iterator orig_si = *gsi;
+  gimple stmt;
 
   if (gimple_in_ssa_p (cfun))
     update_complex_components (gsi, gsi_stmt (*gsi), r, i);
 
   gimple_assign_set_rhs_with_ops (&orig_si, COMPLEX_EXPR, r, i);
-  update_stmt (gsi_stmt (orig_si));
+  stmt = gsi_stmt (orig_si);
+  update_stmt (stmt);
+  if (maybe_clean_eh_stmt (stmt))
+    gimple_purge_dead_eh_edges (gimple_bb (stmt));
 }
 
 
@@ -680,7 +684,7 @@ update_parameter_components (void)
   edge entry_edge = single_succ_edge (ENTRY_BLOCK_PTR);
   tree parm;
 
-  for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
+  for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = DECL_CHAIN (parm))
     {
       tree type = TREE_TYPE (parm);
       tree ssa_name, r, i;
@@ -778,17 +782,14 @@ expand_complex_move (gimple_stmt_iterator *gsi, tree type)
     {
       if (is_ctrl_altering_stmt (stmt))
        {
-         edge_iterator ei;
          edge e;
 
          /* The value is not assigned on the exception edges, so we need not
             concern ourselves there.  We do need to update on the fallthru
             edge.  Find it.  */
-         FOR_EACH_EDGE (e, ei, gsi_bb (*gsi)->succs)
-           if (e->flags & EDGE_FALLTHRU)
-             goto found_fallthru;
-         gcc_unreachable ();
-       found_fallthru:
+         e = find_fallthru_edge (gsi_bb (*gsi)->succs);
+         if (!e)
+           gcc_unreachable ();
 
          r = build1 (REALPART_EXPR, inner_type, lhs);
          i = build1 (IMAGPART_EXPR, inner_type, lhs);
@@ -955,7 +956,7 @@ expand_complex_libcall (gimple_stmt_iterator *gsi, tree ar, tree ai,
             (BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT));
   else
     gcc_unreachable ();
-  fn = built_in_decls[bcode];
+  fn = builtin_decl_explicit (bcode);
 
   stmt = gimple_build_call (fn, 4, ar, ai, br, bi);
   gimple_call_set_lhs (stmt, lhs);
@@ -1622,8 +1623,7 @@ struct gimple_opt_pass pass_lower_complex =
   PROP_gimple_lcx,                     /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+    TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts                        /* todo_flags_finish */
  }
@@ -1653,8 +1653,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
   PROP_gimple_lcx,                     /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  TODO_dump_func
-    | TODO_ggc_collect
+  TODO_ggc_collect
     | TODO_update_ssa
     | TODO_verify_stmts                        /* todo_flags_finish */
  }