* c-pretty-print.c (pp_c_direct_abstract_declarator): Use
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Mar 2007 17:12:28 +0000 (17:12 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Mar 2007 17:12:28 +0000 (17:12 +0000)
fold_build2.
* config/alpha/alpha.c (alpha_fold_builtin_zapnot,
alpha_fold_vector_minmax): Likewise.
* config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122508 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-pretty-print.c
gcc/config/alpha/alpha.c
gcc/config/i386/i386.c
gcc/config/sparc/sparc.c

index 5e8d89a..a514011 100644 (file)
@@ -1,3 +1,12 @@
+2007-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c-pretty-print.c (pp_c_direct_abstract_declarator): Use
+       fold_build2.
+       * config/alpha/alpha.c (alpha_fold_builtin_zapnot,
+       alpha_fold_vector_minmax): Likewise.
+       * config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
+       * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
+
 2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree-sra.c (sra_walk_fns) <ldst>: Document new restriction.
index b69f0da..2b75eec 100644 (file)
@@ -528,8 +528,8 @@ pp_c_direct_abstract_declarator (c_pretty_printer *pp, tree t)
          if (host_integerp (maxval, 0))
            pp_wide_integer (pp, tree_low_cst (maxval, 0) + 1);
          else
-           pp_expression (pp, fold (build2 (PLUS_EXPR, type, maxval,
-                                            build_int_cst (type, 1))));
+           pp_expression (pp, fold_build2 (PLUS_EXPR, type, maxval,
+                                           build_int_cst (type, 1)));
        }
       pp_c_right_bracket (pp);
       pp_direct_abstract_declarator (pp, TREE_TYPE (t));
index 1af68f9..ae00e1c 100644 (file)
@@ -6629,8 +6629,8 @@ alpha_fold_builtin_zapnot (tree *op, unsigned HOST_WIDE_INT opint[],
        return build_int_cst (long_integer_type_node, opint[0] & mask);
 
       if (op)
-       return fold (build2 (BIT_AND_EXPR, long_integer_type_node, op[0],
-                            build_int_cst (long_integer_type_node, mask)));
+       return fold_build2 (BIT_AND_EXPR, long_integer_type_node, op[0],
+                           build_int_cst (long_integer_type_node, mask));
     }
   else if ((op_const & 1) && opint[0] == 0)
     return build_int_cst (long_integer_type_node, 0);
@@ -6783,7 +6783,7 @@ alpha_fold_vector_minmax (enum tree_code code, tree op[], tree vtype)
 {
   tree op0 = fold_convert (vtype, op[0]);
   tree op1 = fold_convert (vtype, op[1]);
-  tree val = fold (build2 (code, vtype, op0, op1));
+  tree val = fold_build2 (code, vtype, op0, op1);
   return fold_convert (long_integer_type_node, val);
 }
 
index cc0b275..ac36887 100644 (file)
@@ -4859,13 +4859,13 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
                  src_offset = REGNO (reg) * 8;
                }
              src_addr = fold_convert (addr_type, src_addr);
-             src_addr = fold (build2 (PLUS_EXPR, addr_type, src_addr,
-                                      size_int (src_offset)));
+             src_addr = fold_build2 (PLUS_EXPR, addr_type, src_addr,
+                                     size_int (src_offset));
              src = build_va_arg_indirect_ref (src_addr);
 
              dest_addr = fold_convert (addr_type, addr);
-             dest_addr = fold (build2 (PLUS_EXPR, addr_type, dest_addr,
-                                       size_int (INTVAL (XEXP (slot, 1)))));
+             dest_addr = fold_build2 (PLUS_EXPR, addr_type, dest_addr,
+                                      size_int (INTVAL (XEXP (slot, 1))));
              dest = build_va_arg_indirect_ref (dest_addr);
 
              t = build2 (GIMPLE_MODIFY_STMT, void_type_node, dest, src);
index 764beb9..9b881e1 100644 (file)
@@ -5673,18 +5673,18 @@ sparc_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
   incr = valist;
   if (align)
     {
-      incr = fold (build2 (PLUS_EXPR, ptr_type_node, incr,
-                          ssize_int (align - 1)));
-      incr = fold (build2 (BIT_AND_EXPR, ptr_type_node, incr,
-                          ssize_int (-align)));
+      incr = fold_build2 (PLUS_EXPR, ptr_type_node, incr,
+                         ssize_int (align - 1));
+      incr = fold_build2 (BIT_AND_EXPR, ptr_type_node, incr,
+                         ssize_int (-align));
     }
 
   gimplify_expr (&incr, pre_p, post_p, is_gimple_val, fb_rvalue);
   addr = incr;
 
   if (BYTES_BIG_ENDIAN && size < rsize)
-    addr = fold (build2 (PLUS_EXPR, ptr_type_node, incr,
-                        ssize_int (rsize - size)));
+    addr = fold_build2 (PLUS_EXPR, ptr_type_node, incr,
+                       ssize_int (rsize - size));
 
   if (indirect)
     {
@@ -5712,7 +5712,7 @@ sparc_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
   else
     addr = fold_convert (ptrtype, addr);
 
-  incr = fold (build2 (PLUS_EXPR, ptr_type_node, incr, ssize_int (rsize)));
+  incr = fold_build2 (PLUS_EXPR, ptr_type_node, incr, ssize_int (rsize));
   incr = build2 (GIMPLE_MODIFY_STMT, ptr_type_node, valist, incr);
   gimplify_and_add (incr, post_p);