tree-vrp.c (add_assert_info): Guard dump_printf with dump_enabled_p.
authorRichard Biener <rguenther@suse.de>
Tue, 23 Oct 2018 11:37:52 +0000 (11:37 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 23 Oct 2018 11:37:52 +0000 (11:37 +0000)
2018-10-23  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (add_assert_info): Guard dump_printf with
dump_enabled_p.
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_incoming_edge):
Use value_range::ignore_equivs_equal_p.

From-SVN: r265422

gcc/ChangeLog
gcc/gimple-ssa-evrp-analyze.c
gcc/tree-vrp.c

index 367e60f4c6b05da2058193daf425b73de0c57aae..f0820c086afafe805491c3f08375d23aadb34695 100644 (file)
@@ -1,3 +1,11 @@
+2018-10-23  Richard Biener  <rguenther@suse.de>
+
+       * tree-vrp.c (add_assert_info): Guard dump_printf with
+       dump_enabled_p.
+       * gimple-ssa-evrp-analyze.c
+       (evrp_range_analyzer::record_ranges_from_incoming_edge):
+       Use value_range::ignore_equivs_equal_p.
+
 2018-10-23  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/87105
index b7b0fd8f17c1741caf881feed65222d8fba656fc..3e5287b1b0bcdb14e1670ee5c9185ddb7663fae4 100644 (file)
@@ -209,9 +209,7 @@ evrp_range_analyzer::record_ranges_from_incoming_edge (basic_block bb)
              value_range *old_vr = get_value_range (vrs[i].first);
              value_range tem (old_vr->kind (), old_vr->min (), old_vr->max ());
              tem.intersect (vrs[i].second);
-             if (tem.kind () == old_vr->kind ()
-                 && tem.min () == old_vr->min ()
-                 && tem.max () == old_vr->max ())
+             if (tem.ignore_equivs_equal_p (*old_vr))
                continue;
              push_value_range (vrs[i].first, vrs[i].second);
              if (is_fallthru
index e3a64fd7e9e5d4a748dd1f8dd9d9cf7dbe1c57cf..17b0b6c60378f5b6e9c2e7d34632bd0f9fe8faa3 100644 (file)
@@ -2299,9 +2299,10 @@ add_assert_info (vec<assert_info> &asserts,
   info.val = val;
   info.expr = expr;
   asserts.safe_push (info);
-  dump_printf (MSG_NOTE | MSG_PRIORITY_INTERNALS,
-              "Adding assert for %T from %T %s %T\n",
-              name, expr, op_symbol_code (comp_code), val);
+  if (dump_enabled_p ())
+    dump_printf (MSG_NOTE | MSG_PRIORITY_INTERNALS,
+                "Adding assert for %T from %T %s %T\n",
+                name, expr, op_symbol_code (comp_code), val);
 }
 
 /* If NAME doesn't have an ASSERT_EXPR registered for asserting