On 6/23/25 18:21, Martin Jambor wrote:
@@ -208,66 +208,6 @@ static const tree_code relation_to_code [VREL_LAST] = {
    ERROR_MARK, ERROR_MARK, LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR,
    NE_EXPR };
-// This routine validates that a relation can be applied to a specific set of
-// ranges.  In particular, floating point x == x may not be true if the NaN bit
-// is set in the range.  Symbolically the oracle will determine x == x,
-// but specific range instances may override this.
-// To verify, attempt to fold the relation using the supplied ranges.
-// One would expect [1,1] to be returned, anything else means there is 
something
-// in the range preventing the relation from applying.
-// If there is no mechanism to verify, assume the relation is acceptable.
-
-relation_kind
-relation_oracle::validate_relation (relation_kind rel, vrange &op1, vrange 
&op2)
-{
-  // If there is no mapping to a tree code, leave the relation as is.
-  tree_code code = relation_to_code [rel];
This seems to have been the only use of the array relation_to_code which
we however still have around.  Should it be removed too?

Thanks,

Martin

Indeed.

Removed thusly.

Bootstraps on x86_64-pc-linux-gnu  with no regressions.   Pushed.

Andrew

From 25a15a4c0318d928d534a0db9592cb6f0e454707 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacl...@redhat.com>
Date: Tue, 24 Jun 2025 16:51:56 -0400
Subject: [PATCH 3/3] Remove unused vector in value-relation.cc.

The relation_to_code vector in value-relation is now unused, so we can
remove it.

	* value-relation.cc (relation_to_code): Remove.
---
 gcc/value-relation.cc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc
index c7ced445ad7..2ac7650fe5b 100644
--- a/gcc/value-relation.cc
+++ b/gcc/value-relation.cc
@@ -202,12 +202,6 @@ adjust_equivalence_range (vrange &range)
     }
  }
 
-// This vector maps a relation to the equivalent tree code.
-
-static const tree_code relation_to_code [VREL_LAST] = {
-  ERROR_MARK, ERROR_MARK, LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR,
-  NE_EXPR };
-
 // Given an equivalence set EQUIV, set all the bits in B that are still valid
 // members of EQUIV in basic block BB.
 
-- 
2.45.0

Reply via email to