This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] fold-const.c merge from mainline


This patch against the tree-ssa branch synchronizes many of differences
between the version of fold-const.c there and the one on mainline.

The following patch has been tested against the tree-ssa branch on
i686-pc-linux-gnu with a complete bootstrap, all languages, and a
top-level "make -k check".  Unfortunately, the snapshot I used had
problems building libgfortran, but there were no new regressions
and two fixed failures.

Ok for the tree-ssa branch?


2003-10-12  Roger Sayle  <roger@eyesopen.com>

	* fold-const.c: Merge from mainline.
	(fold_negate_const): Delete.
	(nondestructive_fold_unary_to_constant): Call negate_expr instead
	of fold_negate_const.
	* tree.c (associate_tree_code, commutative_tree_code): Use a
	switch statement instead of a sequence of comparisons.


Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.213.2.50
diff -c -3 -p -r1.213.2.50 fold-const.c
*** fold-const.c	6 Oct 2003 23:05:27 -0000	1.213.2.50
--- fold-const.c	12 Oct 2003 18:45:08 -0000
*************** Software Foundation, 59 Temple Place - S
*** 60,65 ****
--- 60,66 ----

  static void encode (HOST_WIDE_INT *, unsigned HOST_WIDE_INT, HOST_WIDE_INT);
  static void decode (HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, HOST_WIDE_INT *);
+ static bool negate_mathfn_p (enum built_in_function);
  static bool negate_expr_p (tree);
  static tree negate_expr (tree);
  static tree split_tree (tree, enum tree_code, tree *, tree *, tree *, int);
*************** static bool fold_real_zero_addition_p (t
*** 108,116 ****
  static tree fold_mathfn_compare (enum built_in_function, enum tree_code,
  				 tree, tree, tree);
  static tree fold_inf_compare (enum tree_code, tree, tree, tree);
! static bool tree_swap_operands_p (tree, tree);

- static tree fold_negate_const (tree, tree);
  static tree fold_abs_const (tree, tree);
  static tree fold_relational_const (enum tree_code, tree, tree, tree);
  static tree fold_relational_hi_lo (enum tree_code *, tree *, tree *, tree *);
--- 109,117 ----
  static tree fold_mathfn_compare (enum built_in_function, enum tree_code,
  				 tree, tree, tree);
  static tree fold_inf_compare (enum tree_code, tree, tree, tree);
! static bool reorder_operands_p (tree, tree);
! static bool tree_swap_operands_p (tree, tree, bool);

  static tree fold_abs_const (tree, tree);
  static tree fold_relational_const (enum tree_code, tree, tree, tree);
  static tree fold_relational_hi_lo (enum tree_code *, tree *, tree *, tree *);
*************** div_and_round_double (enum tree_code cod
*** 808,813 ****
--- 809,842 ----
    return overflow;
  }

+ /* Return true if built-in mathematical function specified by CODE
+    preserves the sign of it argument, i.e. -f(x) == f(-x).  */
+
+ static bool
+ negate_mathfn_p (enum built_in_function code)
+ {
+   switch (code)
+     {
+     case BUILT_IN_ASIN:
+     case BUILT_IN_ASINF:
+     case BUILT_IN_ASINL:
+     case BUILT_IN_ATAN:
+     case BUILT_IN_ATANF:
+     case BUILT_IN_ATANL:
+     case BUILT_IN_SIN:
+     case BUILT_IN_SINF:
+     case BUILT_IN_SINL:
+     case BUILT_IN_TAN:
+     case BUILT_IN_TANF:
+     case BUILT_IN_TANL:
+       return true;
+
+     default:
+       break;
+     }
+   return false;
+ }
+
  /* Determine whether an expression T can be cheaply negated using
     the function negate_expr.  */

*************** negate_expr_p (tree t)
*** 827,834 ****
    switch (TREE_CODE (t))
      {
      case INTEGER_CST:
!       if (TREE_UNSIGNED (type))
! 	return false;

        /* Check that -CST will not overflow type.  */
        prec = TYPE_PRECISION (type);
--- 856,863 ----
    switch (TREE_CODE (t))
      {
      case INTEGER_CST:
!       if (TREE_UNSIGNED (type) || ! flag_trapv)
! 	return true;

        /* Check that -CST will not overflow type.  */
        prec = TYPE_PRECISION (type);
*************** negate_expr_p (tree t)
*** 849,857 ****
      case NEGATE_EXPR:
        return true;

      case MINUS_EXPR:
        /* We can't turn -(A-B) into B-A when we honor signed zeros.  */
!       return ! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations;

      case MULT_EXPR:
        if (TREE_UNSIGNED (TREE_TYPE (t)))
--- 878,892 ----
      case NEGATE_EXPR:
        return true;

+     case COMPLEX_CST:
+       return negate_expr_p (TREE_REALPART (t))
+ 	     && negate_expr_p (TREE_IMAGPART (t));
+
      case MINUS_EXPR:
        /* We can't turn -(A-B) into B-A when we honor signed zeros.  */
!       return (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)
! 	     && reorder_operands_p (TREE_OPERAND (t, 0),
! 				    TREE_OPERAND (t, 1));

      case MULT_EXPR:
        if (TREE_UNSIGNED (TREE_TYPE (t)))
*************** negate_expr_p (tree t)
*** 865,870 ****
--- 900,921 ----
  	       || negate_expr_p (TREE_OPERAND (t, 0));
        break;

+     case NOP_EXPR:
+       /* Negate -((double)float) as (double)(-float).  */
+       if (TREE_CODE (type) == REAL_TYPE)
+ 	{
+ 	  tree tem = strip_float_extensions (t);
+ 	  if (tem != t)
+ 	    return negate_expr_p (tem);
+ 	}
+       break;
+
+     case CALL_EXPR:
+       /* Negate -f(x) as f(-x).  */
+       if (negate_mathfn_p (builtin_mathfn_code (t)))
+ 	return negate_expr_p (TREE_VALUE (TREE_OPERAND (t, 1)));
+       break;
+
      default:
        break;
      }
*************** negate_expr (tree t)
*** 889,913 ****
    switch (TREE_CODE (t))
      {
      case INTEGER_CST:
!       if (! TREE_UNSIGNED (type)
! 	  && 0 != (tem = fold (build1 (NEGATE_EXPR, type, t)))
! 	  && ! TREE_OVERFLOW (tem))
  	return tem;
        break;

      case REAL_CST:
        tem = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (t)));
        /* Two's complement FP formats, such as c4x, may overflow.  */
!       if (! TREE_OVERFLOW (tem))
  	return convert (type, tem);
        break;

      case NEGATE_EXPR:
        return convert (type, TREE_OPERAND (t, 0));

      case MINUS_EXPR:
        /* - (A - B) -> B - A  */
!       if (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)
  	return convert (type,
  			fold (build (MINUS_EXPR, TREE_TYPE (t),
  				     TREE_OPERAND (t, 1),
--- 940,992 ----
    switch (TREE_CODE (t))
      {
      case INTEGER_CST:
!       {
! 	unsigned HOST_WIDE_INT low;
! 	HOST_WIDE_INT high;
! 	int overflow = neg_double (TREE_INT_CST_LOW (t),
! 				   TREE_INT_CST_HIGH (t),
! 				   &low, &high);
! 	tem = build_int_2 (low, high);
! 	TREE_TYPE (tem) = type;
! 	TREE_OVERFLOW (tem)
! 	  = (TREE_OVERFLOW (t)
! 	     | force_fit_type (tem, overflow && !TREE_UNSIGNED (type)));
! 	TREE_CONSTANT_OVERFLOW (tem)
! 	  = TREE_OVERFLOW (tem) | TREE_CONSTANT_OVERFLOW (t);
!       }
!       if (! TREE_OVERFLOW (tem)
! 	  || TREE_UNSIGNED (type)
! 	  || ! flag_trapv)
  	return tem;
        break;

      case REAL_CST:
        tem = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (t)));
        /* Two's complement FP formats, such as c4x, may overflow.  */
!       if (! TREE_OVERFLOW (tem) || ! flag_trapping_math)
  	return convert (type, tem);
        break;

+     case COMPLEX_CST:
+       {
+ 	tree rpart = negate_expr (TREE_REALPART (t));
+ 	tree ipart = negate_expr (TREE_IMAGPART (t));
+
+ 	if ((TREE_CODE (rpart) == REAL_CST
+ 	     && TREE_CODE (ipart) == REAL_CST)
+ 	    || (TREE_CODE (rpart) == INTEGER_CST
+ 		&& TREE_CODE (ipart) == INTEGER_CST))
+ 	  return build_complex (type, rpart, ipart);
+       }
+       break;
+
      case NEGATE_EXPR:
        return convert (type, TREE_OPERAND (t, 0));

      case MINUS_EXPR:
        /* - (A - B) -> B - A  */
!       if ((! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)
! 	  && reorder_operands_p (TREE_OPERAND (t, 0), TREE_OPERAND (t, 1)))
  	return convert (type,
  			fold (build (MINUS_EXPR, TREE_TYPE (t),
  				     TREE_OPERAND (t, 1),
*************** negate_expr (tree t)
*** 938,943 ****
--- 1017,1046 ----
  	}
        break;

+     case NOP_EXPR:
+       /* Convert -((double)float) into (double)(-float).  */
+       if (TREE_CODE (type) == REAL_TYPE)
+ 	{
+ 	  tem = strip_float_extensions (t);
+ 	  if (tem != t && negate_expr_p (tem))
+ 	    return convert (type, negate_expr (tem));
+ 	}
+       break;
+
+     case CALL_EXPR:
+       /* Negate -f(x) as f(-x).  */
+       if (negate_mathfn_p (builtin_mathfn_code (t))
+ 	  && negate_expr_p (TREE_VALUE (TREE_OPERAND (t, 1))))
+ 	{
+ 	  tree fndecl, arg, arglist;
+
+ 	  fndecl = get_callee_fndecl (t);
+ 	  arg = negate_expr (TREE_VALUE (TREE_OPERAND (t, 1)));
+ 	  arglist = build_tree_list (NULL_TREE, arg);
+ 	  return build_function_call_expr (fndecl, arglist);
+ 	}
+       break;
+
      default:
        break;
      }
*************** operand_equal_p (tree arg0, tree arg1, i
*** 2035,2045 ****
  	  return rtx_equal_p (RTL_EXPR_RTL (arg0), RTL_EXPR_RTL (arg1));

  	case CALL_EXPR:
- 	  /* If either CALL_EXPR has a side effect, then they can not
- 	     be equal.  */
- 	  if (TREE_SIDE_EFFECTS (arg0) || TREE_SIDE_EFFECTS (arg1))
- 	    return 0;
-
  	  /* If the CALL_EXPRs call different functions, then they
  	     clearly can not be equal.  */
  	  if (! operand_equal_p (TREE_OPERAND (arg0, 0),
--- 2138,2143 ----
*************** fold_single_bit_test (enum tree_code cod
*** 5004,5015 ****
    return NULL_TREE;
  }

  /* Test whether it is preferable two swap two operands, ARG0 and
     ARG1, for example because ARG0 is an integer constant and ARG1
!    isn't.  */

  static bool
! tree_swap_operands_p (tree arg0, tree arg1)
  {
    STRIP_SIGN_NOPS (arg0);
    STRIP_SIGN_NOPS (arg1);
--- 5102,5128 ----
    return NULL_TREE;
  }

+ /* Check whether we are allowed to reorder operands arg0 and arg1,
+    such that the evaluation of arg1 occurs before arg0.  */
+
+ static bool
+ reorder_operands_p (tree arg0, tree arg1)
+ {
+   if (! flag_evaluation_order)
+     return true;
+   if (TREE_CONSTANT (arg0) || TREE_CONSTANT (arg1))
+     return true;
+   return ! TREE_SIDE_EFFECTS (arg0)
+ 	 && ! TREE_SIDE_EFFECTS (arg1);
+ }
+
  /* Test whether it is preferable two swap two operands, ARG0 and
     ARG1, for example because ARG0 is an integer constant and ARG1
!    isn't.  If REORDER is true, only recommend swapping if we can
!    evaluate the operands in reverse order.  */

  static bool
! tree_swap_operands_p (tree arg0, tree arg1, bool reorder)
  {
    STRIP_SIGN_NOPS (arg0);
    STRIP_SIGN_NOPS (arg1);
*************** tree_swap_operands_p (tree arg0, tree ar
*** 5034,5039 ****
--- 5147,5161 ----
    if (TREE_CONSTANT (arg0))
      return 1;

+   if (reorder && flag_evaluation_order
+       && (TREE_SIDE_EFFECTS (arg0) || TREE_SIDE_EFFECTS (arg1)))
+     return 0;
+
+   if (DECL_P (arg1))
+     return 0;
+   if (DECL_P (arg0))
+     return 1;
+
    return 0;
  }

*************** fold (tree expr)
*** 5146,5152 ****
    /* If this is a commutative operation, and ARG0 is a constant, move it
       to ARG1 to reduce the number of tests below.  */
    if (commutative_tree_code (code)
!       && tree_swap_operands_p (arg0, arg1))
      return fold (build (code, type, arg1, arg0));

    /* Now WINS is set as described above,
--- 5268,5274 ----
    /* If this is a commutative operation, and ARG0 is a constant, move it
       to ARG1 to reduce the number of tests below.  */
    if (commutative_tree_code (code)
!       && tree_swap_operands_p (arg0, arg1, true))
      return fold (build (code, type, arg1, arg0));

    /* Now WINS is set as described above,
*************** fold (tree expr)
*** 5505,5569 ****
        return t;

      case NEGATE_EXPR:
!       if (wins)
! 	{
! 	  if (TREE_CODE (arg0) == INTEGER_CST
! 	      || TREE_CODE (arg0) == REAL_CST)
! 	    return fold_negate_const (arg0, type);
! 	}
!       else if (TREE_CODE (arg0) == NEGATE_EXPR)
! 	return TREE_OPERAND (arg0, 0);
!       /* Convert -((double)float) into (double)(-float).  */
!       else if (TREE_CODE (arg0) == NOP_EXPR
! 	       && TREE_CODE (type) == REAL_TYPE)
! 	{
! 	  tree targ0 = strip_float_extensions (arg0);
! 	  if (targ0 != arg0)
! 	    return convert (type, build1 (NEGATE_EXPR, TREE_TYPE (targ0), targ0));
!
! 	}
!
!       /* Convert - (a - b) to (b - a) for non-floating-point.  */
!       else if (TREE_CODE (arg0) == MINUS_EXPR
! 	       && (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations))
! 	return build (MINUS_EXPR, type, TREE_OPERAND (arg0, 1),
! 		      TREE_OPERAND (arg0, 0));
!
!       /* Convert -f(x) into f(-x) where f is sin, tan or atan.  */
!       switch (builtin_mathfn_code (arg0))
! 	{
! 	case BUILT_IN_SIN:
! 	case BUILT_IN_SINF:
! 	case BUILT_IN_SINL:
! 	case BUILT_IN_TAN:
! 	case BUILT_IN_TANF:
! 	case BUILT_IN_TANL:
! 	case BUILT_IN_ATAN:
! 	case BUILT_IN_ATANF:
! 	case BUILT_IN_ATANL:
! 	  if (negate_expr_p (TREE_VALUE (TREE_OPERAND (arg0, 1))))
! 	    {
! 	      tree fndecl, arg, arglist;
!
! 	      fndecl = get_callee_fndecl (arg0);
! 	      arg = TREE_VALUE (TREE_OPERAND (arg0, 1));
! 	      arg = fold (build1 (NEGATE_EXPR, type, arg));
! 	      arglist = build_tree_list (NULL_TREE, arg);
! 	      return build_function_call_expr (fndecl, arglist);
! 	    }
! 	  break;
!
! 	default:
! 	  break;
! 	}
        return t;

      case ABS_EXPR:
        if (wins
  	  && (TREE_CODE (arg0) == INTEGER_CST || TREE_CODE (arg0) == REAL_CST))
  	return fold_abs_const (arg0, type);
!       else if (TREE_CODE (arg0) == ABS_EXPR || TREE_CODE (arg0) == NEGATE_EXPR)
! 	return build1 (ABS_EXPR, type, TREE_OPERAND (arg0, 0));
        /* Convert fabs((double)float) into (double)fabsf(float).  */
        else if (TREE_CODE (arg0) == NOP_EXPR
  	       && TREE_CODE (type) == REAL_TYPE)
--- 5627,5642 ----
        return t;

      case NEGATE_EXPR:
!       if (negate_expr_p (arg0))
! 	return negate_expr (arg0);
        return t;

      case ABS_EXPR:
        if (wins
  	  && (TREE_CODE (arg0) == INTEGER_CST || TREE_CODE (arg0) == REAL_CST))
  	return fold_abs_const (arg0, type);
!       else if (TREE_CODE (arg0) == NEGATE_EXPR)
! 	return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg0, 0)));
        /* Convert fabs((double)float) into (double)fabsf(float).  */
        else if (TREE_CODE (arg0) == NOP_EXPR
  	       && TREE_CODE (type) == REAL_TYPE)
*************** fold (tree expr)
*** 5975,5982 ****
  	  && (FLOAT_TYPE_P (type)
  	      || (INTEGRAL_TYPE_P (type) && flag_wrapv && !flag_trapv))
  	  && negate_expr_p (arg1)
! 	  && (! TREE_SIDE_EFFECTS (arg0) || TREE_CONSTANT (arg1))
! 	  && (! TREE_SIDE_EFFECTS (arg1) || TREE_CONSTANT (arg0)))
  	return fold (build (MINUS_EXPR, type, negate_expr (arg1),
  			    TREE_OPERAND (arg0, 0)));

--- 6048,6054 ----
  	  && (FLOAT_TYPE_P (type)
  	      || (INTEGRAL_TYPE_P (type) && flag_wrapv && !flag_trapv))
  	  && negate_expr_p (arg1)
! 	  && reorder_operands_p (arg0, arg1))
  	return fold (build (MINUS_EXPR, type, negate_expr (arg1),
  			    TREE_OPERAND (arg0, 0)));

*************** fold (tree expr)
*** 6887,6893 ****
      case LE_EXPR:
      case GE_EXPR:
        /* If one arg is a real or integer constant, put it last.  */
!       if (tree_swap_operands_p (arg0, arg1))
  	return fold (build (swap_tree_comparison (code), type, arg1, arg0));

        /* If this is an equality comparison of the address of a non-weak
--- 6959,6965 ----
      case LE_EXPR:
      case GE_EXPR:
        /* If one arg is a real or integer constant, put it last.  */
!       if (tree_swap_operands_p (arg0, arg1, true))
  	return fold (build (swap_tree_comparison (code), type, arg1, arg0));

        /* If this is an equality comparison of the address of a non-weak
*************** fold (tree expr)
*** 7822,7828 ****

        /* If the second operand is simpler than the third, swap them
  	 since that produces better jump optimization results.  */
!       if (tree_swap_operands_p (TREE_OPERAND (t, 1), TREE_OPERAND (t, 2)))
  	{
  	  /* See if this can be inverted.  If it can't, possibly because
  	     it was a floating-point inequality comparison, don't do
--- 7894,7901 ----

        /* If the second operand is simpler than the third, swap them
  	 since that produces better jump optimization results.  */
!       if (tree_swap_operands_p (TREE_OPERAND (t, 1),
! 				TREE_OPERAND (t, 2), false))
  	{
  	  /* See if this can be inverted.  If it can't, possibly because
  	     it was a floating-point inequality comparison, don't do
*************** rtl_expr_nonnegative_p (rtx r)
*** 8572,8612 ****
      }
  }

- /* Return the tree for neg (ARG0) when ARG0 is known to be either
-    an integer constant or real constant.
-
-    TYPE is the type of the result.  */
-
- static tree
- fold_negate_const (tree arg0, tree type)
- {
-   tree t = NULL_TREE;
-
-   if (TREE_CODE (arg0) == INTEGER_CST)
-     {
-       unsigned HOST_WIDE_INT low;
-       HOST_WIDE_INT high;
-       int overflow = neg_double (TREE_INT_CST_LOW (arg0),
- 				 TREE_INT_CST_HIGH (arg0),
- 				 &low, &high);
-       t = build_int_2 (low, high);
-       TREE_TYPE (t) = type;
-       TREE_OVERFLOW (t)
- 	= (TREE_OVERFLOW (arg0)
- 	   | force_fit_type (t, overflow && !TREE_UNSIGNED (type)));
-       TREE_CONSTANT_OVERFLOW (t)
- 	= TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg0);
-     }
-   else if (TREE_CODE (arg0) == REAL_CST)
-     t = build_real (type, REAL_VALUE_NEGATE (TREE_REAL_CST (arg0)));
- #ifdef ENABLE_CHECKING
-   else
-     abort ();
- #endif
-
-   return t;
- }
-
  /* Return the tree for abs (ARG0) when ARG0 is known to be either
     an integer constant or real constant.

--- 8645,8650 ----
*************** nondestructive_fold_unary_to_constant (e
*** 9228,9234 ****

      case NEGATE_EXPR:
        if (TREE_CODE (op0) == INTEGER_CST || TREE_CODE (op0) == REAL_CST)
! 	return fold_negate_const (op0, type);
        else
  	return NULL_TREE;

--- 9266,9272 ----

      case NEGATE_EXPR:
        if (TREE_CODE (op0) == INTEGER_CST || TREE_CODE (op0) == REAL_CST)
! 	return negate_expr (op0);
        else
  	return NULL_TREE;

Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.263.2.57
diff -c -3 -p -r1.263.2.57 tree.c
*** tree.c	6 Oct 2003 17:36:42 -0000	1.263.2.57
--- tree.c	12 Oct 2003 18:45:09 -0000
*************** compare_tree_int (tree t, unsigned HOST_
*** 3491,3506 ****
  bool
  associative_tree_code (enum tree_code code)
  {
!   return (code == BIT_IOR_EXPR
! 	  || code == BIT_AND_EXPR
! 	  || code == BIT_XOR_EXPR
! 	  || code == PLUS_EXPR
! 	  || code == MINUS_EXPR
! 	  || code == MULT_EXPR
! 	  || code == LSHIFT_EXPR
! 	  || code == RSHIFT_EXPR
! 	  || code == MIN_EXPR
! 	  || code == MAX_EXPR);
  }

  /* Return true if CODE represents an commutative tree code.  Otherwise
--- 3491,3514 ----
  bool
  associative_tree_code (enum tree_code code)
  {
!   switch (code)
!     {
!     case BIT_IOR_EXPR:
!     case BIT_AND_EXPR:
!     case BIT_XOR_EXPR:
!     case PLUS_EXPR:
!     case MINUS_EXPR:
!     case MULT_EXPR:
!     case LSHIFT_EXPR:
!     case RSHIFT_EXPR:
!     case MIN_EXPR:
!     case MAX_EXPR:
!       return true;
!
!     default:
!       break;
!     }
!   return false;
  }

  /* Return true if CODE represents an commutative tree code.  Otherwise
*************** associative_tree_code (enum tree_code co
*** 3508,3522 ****
  bool
  commutative_tree_code (enum tree_code code)
  {
!   return (code == PLUS_EXPR
! 	  || code == MULT_EXPR
! 	  || code == MIN_EXPR
! 	  || code == MAX_EXPR
! 	  || code == BIT_IOR_EXPR
! 	  || code == BIT_XOR_EXPR
! 	  || code == BIT_AND_EXPR
! 	  || code == NE_EXPR
! 	  || code == EQ_EXPR);
  }

  /* Generate a hash value for an expression.  This can be used iteratively
--- 3516,3538 ----
  bool
  commutative_tree_code (enum tree_code code)
  {
!   switch (code)
!     {
!     case PLUS_EXPR:
!     case MULT_EXPR:
!     case MIN_EXPR:
!     case MAX_EXPR:
!     case BIT_IOR_EXPR:
!     case BIT_XOR_EXPR:
!     case BIT_AND_EXPR:
!     case NE_EXPR:
!     case EQ_EXPR:
!       return true;
!
!     default:
!       break;
!     }
!   return false;
  }

  /* Generate a hash value for an expression.  This can be used iteratively

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]