]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove unused get_identity_relation.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 9 Oct 2023 14:01:11 +0000 (10:01 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 9 Oct 2023 16:15:17 +0000 (12:15 -0400)
Turns out we didnt need this as there is no unordered relations
managed by the oracle.

* gimple-range-gori.cc (gori_compute::compute_operand1_range): Do
not call get_identity_relation.
(gori_compute::compute_operand2_range): Ditto.
* value-relation.cc (get_identity_relation): Remove.
* value-relation.h (get_identity_relation): Remove protyotype.

gcc/gimple-range-gori.cc
gcc/value-relation.cc
gcc/value-relation.h

index 1b5eda43390c7ef3c8fbd72ee49e954944f04917..887da0ff09408b044cc76742d69e474b9e59d0e2 100644 (file)
@@ -1146,10 +1146,7 @@ gori_compute::compute_operand1_range (vrange &r,
 
       // If op1 == op2, create a new trio for just this call.
       if (op1 == op2 && gimple_range_ssa_p (op1))
-       {
-         relation_kind k = get_identity_relation (op1, op1_range);
-         trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), k);
-       }
+       trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), VREL_EQ);
       if (!handler.calc_op1 (r, lhs, op2_range, trio))
        return false;
     }
@@ -1225,10 +1222,7 @@ gori_compute::compute_operand2_range (vrange &r,
 
   // If op1 == op2, create a new trio for this stmt.
   if (op1 == op2 && gimple_range_ssa_p (op1))
-    {
-      relation_kind k = get_identity_relation (op1, op1_range);
-      trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), k);
-    }
+    trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), VREL_EQ);
   // Intersect with range for op2 based on lhs and op1.
   if (!handler.calc_op2 (r, lhs, op1_range, trio))
     return false;
index 8fea4aad3458479dab44d5a1fdf7b72c4b51114b..a2ae39692a611841d95333a07fe9ae39b2ebbd02 100644 (file)
@@ -183,20 +183,6 @@ relation_transitive (relation_kind r1, relation_kind r2)
   return relation_kind (rr_transitive_table[r1][r2]);
 }
 
-// When operands of a statement are identical ssa_names, return the
-// approriate relation between operands for NAME == NAME, given RANGE.
-//
-relation_kind
-get_identity_relation (tree name, vrange &range ATTRIBUTE_UNUSED)
-{
-  // Return VREL_UNEQ when it is supported for floats as appropriate.
-  if (frange::supports_p (TREE_TYPE (name)))
-    return VREL_EQ;
-
-  // Otherwise return VREL_EQ.
-  return VREL_EQ;
-}
-
 // This vector maps a relation to the equivalent tree code.
 
 static const tree_code relation_to_code [VREL_LAST] = {
index f00f84f93b645173f82a25619ea5c5c98d49c04c..be6e277421bf16663afae3050e8f7505d6de02c4 100644 (file)
@@ -91,9 +91,6 @@ inline bool relation_equiv_p (relation_kind r)
 
 void print_relation (FILE *f, relation_kind rel);
 
-// Return relation for NAME == NAME with RANGE.
-relation_kind get_identity_relation (tree name, vrange &range);
-
 class relation_oracle
 {
 public: