]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-propagate.c (add_control_edge): Print less vertical space.
authorRichard Biener <rguenther@suse.de>
Wed, 28 May 2014 14:24:09 +0000 (14:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 May 2014 14:24:09 +0000 (14:24 +0000)
2014-05-28  Richard Biener  <rguenther@suse.de>

* tree-ssa-propagate.c (add_control_edge): Print less vertical space.
* tree-vrp.c (extract_range_from_ssa_name): Also copy VR_UNDEFINED.
(vrp_visit_assignment_or_call): Print less vertical space.
(vrp_visit_stmt): Likewise.
(vrp_visit_phi_node): Likewise.  For a PHI argument with
VR_VARYING range consider recording it as copy.

From-SVN: r211022

gcc/ChangeLog
gcc/tree-ssa-propagate.c
gcc/tree-vrp.c

index 1460f2adc6a719a07006897747e4e76d791152d4..42aade9555c326b1a18303a94fcf436b492cc64a 100644 (file)
@@ -1,3 +1,12 @@
+2014-05-28  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-propagate.c (add_control_edge): Print less vertical space.
+       * tree-vrp.c (extract_range_from_ssa_name): Also copy VR_UNDEFINED.
+       (vrp_visit_assignment_or_call): Print less vertical space.
+       (vrp_visit_stmt): Likewise.
+       (vrp_visit_phi_node): Likewise.  For a PHI argument with
+       VR_VARYING range consider recording it as copy.
+
 2014-05-28  Richard Biener  <rguenther@suse.de>
 
        Revert
index 4e76d97e63974d18b6b8b3f19a922c04998ede6a..1988835aa32638d97bc6697ad5e47726d1211601 100644 (file)
@@ -301,7 +301,7 @@ add_control_edge (edge e)
   cfg_blocks_add (bb);
 
   if (dump_file && (dump_flags & TDF_DETAILS))
-    fprintf (dump_file, "Adding Destination of edge (%d -> %d) to worklist\n\n",
+    fprintf (dump_file, "\nAdding Destination of edge (%d -> %d) to worklist\n",
        e->src->index, e->dest->index);
 }
 
index 67c70cb113234670b80bc816db4910f770125343..034fa0720d2e7fafcef84bc7e0b0c6d6793a20fe 100644 (file)
@@ -1810,7 +1810,7 @@ extract_range_from_ssa_name (value_range_t *vr, tree var)
 {
   value_range_t *var_vr = get_value_range (var);
 
-  if (var_vr->type != VR_UNDEFINED && var_vr->type != VR_VARYING)
+  if (var_vr->type != VR_VARYING)
     copy_value_range (vr, var_vr);
   else
     set_value_range (vr, VR_RANGE, var, var, NULL);
@@ -6679,7 +6679,7 @@ vrp_visit_assignment_or_call (gimple stmt, tree *output_p)
              print_generic_expr (dump_file, lhs, 0);
              fprintf (dump_file, ": ");
              dump_value_range (dump_file, &new_vr);
-             fprintf (dump_file, "\n\n");
+             fprintf (dump_file, "\n");
            }
 
          if (new_vr.type == VR_VARYING)
@@ -7473,7 +7473,6 @@ vrp_visit_stmt (gimple stmt, edge *taken_edge_p, tree *output_p)
     {
       fprintf (dump_file, "\nVisiting statement:\n");
       print_gimple_stmt (dump_file, stmt, 0, dump_flags);
-      fprintf (dump_file, "\n");
     }
 
   if (!stmt_interesting_for_vrp (stmt))
@@ -8242,7 +8241,7 @@ vrp_visit_phi_node (gimple phi)
       if (dump_file && (dump_flags & TDF_DETAILS))
        {
          fprintf (dump_file,
-             "\n    Argument #%d (%d -> %d %sexecutable)\n",
+             "    Argument #%d (%d -> %d %sexecutable)\n",
              (int) i, e->src->index, e->dest->index,
              (e->flags & EDGE_EXECUTABLE) ? "" : "not ");
        }
@@ -8260,16 +8259,30 @@ vrp_visit_phi_node (gimple phi)
              /* Do not allow equivalences or symbolic ranges to leak in from
                 backedges.  That creates invalid equivalencies.
                 See PR53465 and PR54767.  */
-             if (e->flags & EDGE_DFS_BACK
-                 && (vr_arg.type == VR_RANGE
-                     || vr_arg.type == VR_ANTI_RANGE))
+             if (e->flags & EDGE_DFS_BACK)
                {
-                 vr_arg.equiv = NULL;
-                 if (symbolic_range_p (&vr_arg))
+                 if (vr_arg.type == VR_RANGE
+                     || vr_arg.type == VR_ANTI_RANGE)
                    {
-                     vr_arg.type = VR_VARYING;
-                     vr_arg.min = NULL_TREE;
-                     vr_arg.max = NULL_TREE;
+                     vr_arg.equiv = NULL;
+                     if (symbolic_range_p (&vr_arg))
+                       {
+                         vr_arg.type = VR_VARYING;
+                         vr_arg.min = NULL_TREE;
+                         vr_arg.max = NULL_TREE;
+                       }
+                   }
+               }
+             else
+               {
+                 /* If the non-backedge arguments range is VR_VARYING then
+                    we can still try recording a simple equivalence.  */
+                 if (vr_arg.type == VR_VARYING)
+                   {
+                     vr_arg.type = VR_RANGE;
+                     vr_arg.min = arg;
+                     vr_arg.max = arg;
+                     vr_arg.equiv = NULL;
                    }
                }
            }
@@ -8288,7 +8301,7 @@ vrp_visit_phi_node (gimple phi)
            {
              fprintf (dump_file, "\t");
              print_generic_expr (dump_file, arg, dump_flags);
-             fprintf (dump_file, "\n\tValue: ");
+             fprintf (dump_file, ": ");
              dump_value_range (dump_file, &vr_arg);
              fprintf (dump_file, "\n");
            }
@@ -8396,7 +8409,7 @@ update_range:
          print_generic_expr (dump_file, lhs, 0);
          fprintf (dump_file, ": ");
          dump_value_range (dump_file, &vr_result);
-         fprintf (dump_file, "\n\n");
+         fprintf (dump_file, "\n");
        }
 
       return SSA_PROP_INTERESTING;