aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-05-28 14:24:09 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-05-28 14:24:09 +0000
commit6e5799b9045f7a7588e3e2037a2acb67f0a168ec (patch)
treee5127346b0caf1f86077aceeaa2b4a316f4f7d1a /gcc/tree-vrp.c
parent47f9fca8551dcb661bc73e340790b68d2f971c25 (diff)
downloadgcc-6e5799b9045f7a7588e3e2037a2acb67f0a168ec.zip
gcc-6e5799b9045f7a7588e3e2037a2acb67f0a168ec.tar.gz
gcc-6e5799b9045f7a7588e3e2037a2acb67f0a168ec.tar.bz2
tree-ssa-propagate.c (add_control_edge): Print less vertical space.
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
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 67c70cb..034fa07 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -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;