OSDN Git Service

2006-05-15 Mircea Namolaru <namolaru@il.ibm.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree-complex.c
index d856742..65466bb 100644 (file)
@@ -79,7 +79,7 @@ cvc_insert (unsigned int uid, tree to)
   struct int_tree_map *h;
   void **loc;
 
-  h = xmalloc (sizeof (struct int_tree_map));
+  h = XNEW (struct int_tree_map);
   h->uid = uid;
   h->to = to;
   loc = htab_find_slot_with_hash (complex_variable_components, h,
@@ -652,6 +652,8 @@ update_parameter_components (void)
 
       type = TREE_TYPE (type);
       ssa_name = default_def (parm);
+      if (!ssa_name)
+       continue;
 
       r = build1 (REALPART_EXPR, type, ssa_name);
       i = build1 (IMAGPART_EXPR, type, ssa_name);
@@ -1124,7 +1126,7 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
         bsi_insert_before (bsi, t1, BSI_SAME_STMT);
         t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
         bsi_insert_before (bsi, t1, BSI_SAME_STMT);
-        bsi_remove (bsi);
+        bsi_remove (bsi, true);
        }
     }
 
@@ -1163,7 +1165,7 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
         bsi_insert_before (bsi, t1, BSI_SAME_STMT);
         t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
         bsi_insert_before (bsi, t1, BSI_SAME_STMT);
-        bsi_remove (bsi);
+        bsi_remove (bsi, true);
        }
     }
 
@@ -1480,7 +1482,7 @@ expand_complex_operations_1 (block_stmt_iterator *bsi)
 \f
 /* Entry point for complex operation lowering during optimization.  */
 
-static void
+static unsigned int
 tree_lower_complex (void)
 {
   int old_last_basic_block;
@@ -1488,7 +1490,7 @@ tree_lower_complex (void)
   basic_block bb;
 
   if (!init_dont_simulate_again ())
-    return;
+    return 0;
 
   complex_lattice_values = VEC_alloc (complex_lattice_t, heap, num_ssa_names);
   VEC_safe_grow (complex_lattice_t, heap,
@@ -1525,6 +1527,7 @@ tree_lower_complex (void)
   htab_delete (complex_variable_components);
   VEC_free (tree, heap, complex_ssa_name_components);
   VEC_free (complex_lattice_t, heap, complex_lattice_values);
+  return 0;
 }
 
 struct tree_opt_pass pass_lower_complex = 
@@ -1549,7 +1552,7 @@ struct tree_opt_pass pass_lower_complex =
 \f
 /* Entry point for complex operation lowering without optimization.  */
 
-static void
+static unsigned int
 tree_lower_complex_O0 (void)
 {
   int old_last_basic_block = last_basic_block;
@@ -1563,6 +1566,7 @@ tree_lower_complex_O0 (void)
       for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
        expand_complex_operations_1 (&bsi);
     }
+  return 0;
 }
 
 static bool