diff mbox series

[committed] make vrp_bitmap_equal_p static

Message ID b26a21e0-6ce3-50c8-27b3-4fd125d5c217@redhat.com
State New
Headers show
Series [committed] make vrp_bitmap_equal_p static | expand

Commit Message

Aldy Hernandez Nov. 5, 2019, 4:14 a.m. UTC
This function is only used once, so there's no need for it to be 
externally visible.

Committed as obvious.
diff mbox series

Patch

commit 53363b9234db6e3b696abc53b24ea1e0d2547038
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Nov 5 05:10:41 2019 +0100

    Move vrp_bitmap_equal_p above its only use and make it static.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1c2fff16295..f492ea6da0c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@ 
+2019-11-05  Aldy Hernandez  <aldyh@redhat.com>
+
+	* tree-vrp.h (vrp_bitmap_equal_p): Remove.
+	* tree-vrp.c (vrp_bitmap_equal_p): Move before use and make
+	static.
+
 2019-11-05  Aldy Hernandez  <aldyh@redhat.com>
 
 	* tree-vrp.c (value_range_base::operator==): Use equal_p to
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index a6d44e9dc6d..e926670b962 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -254,6 +254,18 @@  value_range_base::equal_p (const value_range_base &other) const
 	  && vrp_operand_equal_p (m_max, other.m_max));
 }
 
+/* Return true if the bitmaps B1 and B2 are equal.  */
+
+static bool
+vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2)
+{
+  return (b1 == b2
+	  || ((!b1 || bitmap_empty_p (b1))
+	      && (!b2 || bitmap_empty_p (b2)))
+	  || (b1 && b2
+	      && bitmap_equal_p (b1, b2)));
+}
+
 /* Returns TRUE if THIS == OTHER.  Ignores the equivalence bitmap if
    IGNORE_EQUIVS is TRUE.  */
 
@@ -910,18 +922,6 @@  vrp_operand_equal_p (const_tree val1, const_tree val2)
   return true;
 }
 
-/* Return true, if the bitmaps B1 and B2 are equal.  */
-
-bool
-vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2)
-{
-  return (b1 == b2
-	  || ((!b1 || bitmap_empty_p (b1))
-	      && (!b2 || bitmap_empty_p (b2)))
-	  || (b1 && b2
-	      && bitmap_equal_p (b1, b2)));
-}
-
 static bool
 range_has_numeric_bounds_p (const value_range_base *vr)
 {
diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h
index 5cd94733188..3861634fb7e 100644
--- a/gcc/tree-vrp.h
+++ b/gcc/tree-vrp.h
@@ -279,8 +279,6 @@  extern void register_edge_assert_for (tree, edge, enum tree_code,
 extern bool stmt_interesting_for_vrp (gimple *);
 extern bool infer_value_range (gimple *, tree, tree_code *, tree *);
 
-extern bool vrp_bitmap_equal_p (const_bitmap, const_bitmap);
-
 extern bool range_int_cst_p (const value_range_base *);
 
 extern int compare_values (tree, tree);