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]

[patch] fold-const.c: Reorganize fold - Part 9/n


Hi,

Attached is part 9 of my patch to reorganize fold.

Eventually, we want fold_binary to look like

  fold_binary (code, type, op0, op1)

instead of

  fold_binary (binary_expr)

So we should use code instead of TREE_CODE (t).

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>

	* fold-const.c (fold_binary): Use code instead of t.

Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.527
diff -u -d -p -r1.527 fold-const.c
--- fold-const.c	6 Mar 2005 02:25:03 -0000	1.527
+++ fold-const.c	6 Mar 2005 02:28:06 -0000
@@ -8727,7 +8727,7 @@ fold_binary (tree expr)
       /* If this is a comparison of two exprs that look like an
 	 ARRAY_REF of the same object, then we can fold this to a
 	 comparison of the two offsets.  */
-      if (COMPARISON_CLASS_P (t))
+      if (TREE_CODE_CLASS (code) == tcc_comparison)
 	{
 	  tree base0, offset0, base1, offset1;
 


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