OSDN Git Service

* config/spu/spu-protos.c (spu_split_address): Add.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-dom.c
index 431f856..b277068 100644 (file)
@@ -240,7 +240,6 @@ tree_ssa_dominator_optimize (void)
 {
   struct dom_walk_data walk_data;
   unsigned int i;
-  struct loops loops_info;
 
   memset (&opt_stats, 0, sizeof (opt_stats));
 
@@ -276,9 +275,12 @@ tree_ssa_dominator_optimize (void)
   /* We need to know which edges exit loops so that we can
      aggressively thread through loop headers to an exit
      edge.  */
-  flow_loops_find (&loops_info);
-  mark_loop_exit_edges (&loops_info);
-  flow_loops_free (&loops_info);
+  loop_optimizer_init (0);
+  if (current_loops)
+    {
+      mark_loop_exit_edges ();
+      loop_optimizer_finalize ();
+    }
 
   /* Clean up the CFG so that any forwarder blocks created by loop
      canonicalization are removed.  */
@@ -950,36 +952,61 @@ record_conditions (struct edge_info *edge_info, tree cond, tree inverted)
     {
     case LT_EXPR:
     case GT_EXPR:
-      edge_info->max_cond_equivalences = 12;
-      edge_info->cond_equivalences = XNEWVEC (tree, 12);
+      if (FLOAT_TYPE_P (TREE_TYPE (op0)))
+       {
+         edge_info->max_cond_equivalences = 12;
+         edge_info->cond_equivalences = XNEWVEC (tree, 12);
+         build_and_record_new_cond (ORDERED_EXPR, op0, op1,
+                                    &edge_info->cond_equivalences[8]);
+         build_and_record_new_cond (LTGT_EXPR, op0, op1,
+                                    &edge_info->cond_equivalences[10]);
+       }
+      else
+       {
+         edge_info->max_cond_equivalences = 8;
+         edge_info->cond_equivalences = XNEWVEC (tree, 8);
+       }
+
       build_and_record_new_cond ((TREE_CODE (cond) == LT_EXPR
                                  ? LE_EXPR : GE_EXPR),
                                 op0, op1, &edge_info->cond_equivalences[4]);
-      build_and_record_new_cond (ORDERED_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[6]);
       build_and_record_new_cond (NE_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[8]);
-      build_and_record_new_cond (LTGT_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[10]);
+                                &edge_info->cond_equivalences[6]);
       break;
 
     case GE_EXPR:
     case LE_EXPR:
-      edge_info->max_cond_equivalences = 6;
-      edge_info->cond_equivalences = XNEWVEC (tree, 6);
-      build_and_record_new_cond (ORDERED_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[4]);
+      if (FLOAT_TYPE_P (TREE_TYPE (op0)))
+       {
+         edge_info->max_cond_equivalences = 6;
+         edge_info->cond_equivalences = XNEWVEC (tree, 6);
+         build_and_record_new_cond (ORDERED_EXPR, op0, op1,
+                                    &edge_info->cond_equivalences[4]);
+       }
+      else
+       {
+         edge_info->max_cond_equivalences = 4;
+         edge_info->cond_equivalences = XNEWVEC (tree, 4);
+       }
       break;
 
     case EQ_EXPR:
-      edge_info->max_cond_equivalences = 10;
-      edge_info->cond_equivalences = XNEWVEC (tree, 10);
-      build_and_record_new_cond (ORDERED_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[4]);
+      if (FLOAT_TYPE_P (TREE_TYPE (op0)))
+       {
+         edge_info->max_cond_equivalences = 10;
+         edge_info->cond_equivalences = XNEWVEC (tree, 10);
+         build_and_record_new_cond (ORDERED_EXPR, op0, op1,
+                                    &edge_info->cond_equivalences[8]);
+       }
+      else
+       {
+         edge_info->max_cond_equivalences = 8;
+         edge_info->cond_equivalences = XNEWVEC (tree, 8);
+       }
       build_and_record_new_cond (LE_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[6]);
+                                &edge_info->cond_equivalences[4]);
       build_and_record_new_cond (GE_EXPR, op0, op1,
-                                &edge_info->cond_equivalences[8]);
+                                &edge_info->cond_equivalences[6]);
       break;
 
     case UNORDERED_EXPR:
@@ -2304,7 +2331,7 @@ propagate_rhs_into_lhs (tree stmt, tree lhs, tree rhs, bitmap interesting_names)
        }
 
       /* Ensure there is nothing else to do. */ 
-      gcc_assert (all && has_zero_uses (lhs));
+      gcc_assert (!all || has_zero_uses (lhs));
 
       /* If we were able to propagate away all uses of LHS, then
         we can remove STMT.  */